我最近才在使用discord.py和discord.ext命令扩展来制作机器人时遇到一个问题 当我调用一个命令时,它会运行两次,导致许多错误和错误。它仅在添加此命令后才开始发生 @commands.command()
#if user is alreadyafk, remove them from the afk dict, if not add them to it
在discord.py中重写:user = bot.get_user("my userid") channel = bot.get_channel("the id of the channel I want the bot我试图指定,一旦我使用if member.id == 'my user id' and c
Reason: {activity}""")
print("A user is afk...")
我正试着做一个afk的命令,这就是我的全部。我很难让我的机器人响应最近使用这个afk命令的用户。基本上我是想让Dyno机器人的afk指令。"The AFK module allows users to set an AFK status inside of y
我试图在一个不和谐的渠道向每个人发送一个私人信息,如果他们有一个特定的角色。from discord.ext import commandsasync def message_role(ctx, role: discord.Role, *, message):
for member in ctx.message.server.m
我想要创建一个在命令被调用后运行的命令,这是我的代码: if (message.content.startsWith(config.prefix+"afkon")) { if (afk == true) {
message.channel.send("Turned on AFK mode");Try again later.