我想实现一个很酷的广播命令。该命令将是这样的。如果管理员DM与机器人一起$bc <whatever they want to type here>进行攻击,则机器人会将消息发送到#broadcast。它可以从 DM 和服务器读取。我尝试了此命令,但它没有按照我的想法工作。
@bot.command(pass_context=True)
async def bc(args, message):
channel = server.get_channel("474316889435275264")
await bot.send_message(channel, args)
它无法读取任何内容, channel = server.get_channel("474316889435275264") 所以我知道代码是错误的。
PS:这就像“说”命令,但它会将它发送到指定的频道。
鸿蒙传说
千巷猫影
随时随地看视频慕课网APP
相关分类