【发布时间】:2021-09-21 16:39:04
【问题描述】:
我尝试了许多不同的方法,并在 youtube 上进行了搜索,但我尝试的所有方法都不起作用(已过时或不相关),我如何为提到的用户添加角色?
这是我的代码,看,最后我在()中写的。
@client.command()
@commands.has_permissions(kick_members=True)
async def mute(ctx, member:discord.Member,*,reason=None):
Embed = discord.Embed(title = f'✅{member} was muted by {ctx.author.name}!',color = 0x00ff00)
Embed.add_field(name=f'Reason', value=f'{reason}')
Embed.set_image(url='https://ak.picdn.net/shutterstock/videos/1014234401/thumb/1.jpg')
await ctx.message.channel.send(embed=Embed)
await (The command that should add the role "Muted" to the mentioned user)
【问题讨论】:
标签: python discord.py