此命令适用于具有特定角色的用户。 它不会沙化消息,但也不会沙化有关错误的消息。请帮忙? 我的代码:
@client.command(pass_context = True)
async def m(ctx, *,message,amount = 1):
if "Test" in [role.name for role in message.author.roles]:
embed = discord.Embed(description=message, color = 0x1abc9c)
await ctx.channel.purge(limit = amount)
msg = await ctx.send(embed=embed)
else:
print("error")