【发布时间】:2019-04-15 17:35:31
【问题描述】:
对不起,如果这是一个如此愚蠢的问题,但我想知道这个命令有什么问题,因为我收到 discord.ext.commands.errors.BadArgument: Converting to "EnumMeta" failed. 作为错误。错误究竟是什么意思,正确的命令是什么?
@commands.command(pass_context = True)
@commands.has_permissions(manage_server=True)
async def region(self, ctx, region=discord.ServerRegion):
"""Changes the server region."""
if not region:
await self.bot.say("What region are we changing to, {ctx.message.author.mention}?")
await self.bot.edit_server(region)
await self.bot.say("Ok! We're now in " + str(ctx.message.server.region) + " :smiley:")
print('ok')
【问题讨论】:
标签: python-3.x discord discord.py