我正在尝试发出一个命令,踢出具有特定角色的所有成员。进展不太顺利 - 这是我当前的代码:
import discord
from discord.ext import commands
from discord.ext.commands import has_permissions
client = commands.Bot(command_prefix = "k!")
@client.command(pass_context=True)
@has_permissions(administrator=True)
async def kickall(ctx):
role_id = 754061046704242799
for role_id in roles: #roles undefined lol
try:
await member.kick()
except:
continue
潇湘沐
相关分类