discord.py ボットのキック コマンドを作成しています。これは、キック コマンドのコードの一部です。
async kick_command(self, ctx, userName: discord.User):
prefix_used = ctx.prefix
alias_used = ctx.invoked_with
text = msg[len(prefix_used) + len(alias_used):]
if discord.User permissions = "admin":
try:
kick(User)
except Exception as e:
ee = "Error: " + e
await ctx.send_message(content=ee)
kick(User)
if ステートメントが無効な構文であると確信しています。手伝って頂けますか?
私のコード: ここをクリック