All relevant discord connections have been made, and the bot recognizes mute and unmute as a command, it just doesnt work. Also - how can i make it so there is a time for the mute?
@client.command()
async def mute(ctx, member: discord.Member):
role_members = discord.utils.get(ctx.guild.roles, name='Member')
role_muted = discord.utils.get(ctx.guild.roles, name='Muted')
await member.remove_roles(role_members)
await member.add_roles(role_muted)
await context.send("f'User {member} Was Muted")
@client.command()
async def unmute(ctx, member: discord.Member):
role_members = discord.utils.get(ctx.guild.roles, name='Member')
role_muted = discord.utils.get(ctx.guild.roles, name='Muted')
await member.remove_roles(role_muted)
await member.add_roles(role_members)
await context.send("f'User {member} Was Unmuted")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…