Answers for "discord.py clear"

2

discord.py clear command

@client.command()
async def clear(ctx, amount=5):
	await ctx.channel.purge(limit=ammount)
Posted by: Guest on November-30-2020
0

discord.py clear

@bot.command()
async def clear(ctx, amount=5):
	await ctx.channel.purge(limit=amount)

or

@client.command()
async def clear(ctx, amount=5):
	await ctx.channel.purge(limit=amount)
Posted by: Guest on February-05-2021
0

discord.py clear status

def _status(self, ctx, *, message):
        '''Set a custom playing status for the bot.'''
        if message == 'clear':
            return await self.change_presence(activity=None)
        await self.change_presence(activity=discord.Game(message))
        await ctx.send(f"Changed status to **{message}**")
Posted by: Guest on March-27-2021

Python Answers by Framework

Browse Popular Code Answers by Language