Answers for "discord py check if user plays game"

2

discord.py check if user has role

@bot.command(pass_context=True)
    @commands.has_role("Admin")
    async def unmute(ctx, user: discord.Member):
        role = discord.utils.find(lambda r: r.name == 'Member', ctx.message.server.roles)
        if role in user.roles:
            await bot.say("{} is not muted".format(user))
        else:
            await bot.add_roles(user, role)
Posted by: Guest on January-08-2021
0

how to check if chat is nsfw discord.py

channel_nsfw = await self.is_nsfw(ctx.message.channel)
if channel_nsfw:
	print("NSFW!")
Posted by: Guest on December-18-2020

Code answers related to "Assembly"

Browse Popular Code Answers by Language