Discord.py斜杠命令需要一个数字输入



我想在我的斜杠命令中请求一个数字。谢谢你!:(代码:

@tree.command(guild = discord.Object(id=guild_id), name = 'leaderbord', description='Check leaderbord') 
async def slash3(interaction: discord.Interaction, number: #What is needed here?):

答案是number: int感谢@furas!正确的代码是:

@tree.command(guild = discord.Object(id=guild_id), name = 'leaderbord', description='Check leaderbord') 
async def slash3(interaction: discord.Interaction, number: int):   

相关内容

  • 没有找到相关文章