commands#

async check_rerun_command(ctx, response)[source]#

Check if the command should be rerun (and reruns if should be).

For a command to be rerun, the user must edit their invocation message within REDO_TIMEOUT seconds, and then react with the REDO_EMOJI within 10 seconds.

Parameters:
  • ctx (Context) – The command’s context

  • response (Message) – The job’s response message

Return type:

None

async clean_text_or_reply(ctx, text=None)[source]#

Cleans a text argument or replied message’s content.

Parameters:
  • ctx (Context) – The command’s context

  • text (Optional[str]) – The provided text argument of the command (if given)

Raises:

discord.ext.commands.BadArgumenttext wasn’t provided and there’s no reply message / reply message content.

Return type:

str

Returns:

The cleaned version of text, if given, else replied message.