Answers for "how to consider the rest of a command as a single argument discord.py"

1

is_on_cooldown discord.py

is_on_cooldown(Context)
'''
Context is the context for the command
is_on_cooldown returns a boolean operator of if the command mentioned is on cooldown.
You need to pass_context to use it
'''

EXAMPLE:
  
@client.command(pass_content=True)
async def notcool(ctx):
  for command in client.commands():
    await ctx.channel.send(ctx.is_on_cooldown(command))
    #This will send out the cooldown status of all the commands in the bot.
Posted by: Guest on September-20-2020
0

how to limit a command to a role in discord.py

@bot.command()
@commands.has_role('RoleName')
async def command_name():
Posted by: Guest on June-24-2020

Code answers related to "how to consider the rest of a command as a single argument discord.py"

Python Answers by Framework

Browse Popular Code Answers by Language