使机器人在特定频道中发言

时间:2018-12-25 04:20:21

标签: python python-3.x discord discord.py

因此,当前,当我在机器人上使用ban命令时,它在当前频道中说它禁止了该用户,但是我将如何使该机器人在另一个频道(如日志频道)中这样说呢? 我当前的禁止代码是

@bot.command(pass_context=True)
async def ban(ctx, member: discord.Member, message):
    if ctx.message.author.server_permissions.ban_members:
        embed=discord.Embed(title="You have been banned from Roblox Gang", description=message, color=0x00ff00f6)
        await bot.send_message(member, embed=embed)
        await bot.ban(member)
        await bot.say("{0} has been banned for {1}".format(member, message))
    else:
        await bot.say("Permission Denied")

0 个答案:

没有答案