Answers for "discord.py clearwarns command"

3

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
1

discord.py optional argument

@client.command()
async def hellothere(ctx, *, msg):
    await ctx.send("General Kenobi")
#to add an optional Argument simply add an =None (anything else alowed to) after msg
#the * means that it gives you everthing after the command
async def hellothere(ctx, *, msg=''):
Posted by: Guest on December-11-2020

Python Answers by Framework

Browse Popular Code Answers by Language