talkomatic.py 0.1.2
An easy-to-use Python versatile wrapper for the Talkomatic Bot interface ensuring best practices for making bots, and handling the REST API.
 
Loading...
Searching...
No Matches
talkomatic.commands.command.Command Class Reference

Public Member Functions

None __init__ (self, str name, str description, list[str] aliases=[], bool hidden=False)
 
None add_argument (self, list[str] names, str description, Type[Union[int, float, str, bool]] data_type, bool positional=False, bool required=True, int number_of_args=1)
 
str execute (self, User user, str args)
 

Public Attributes

 name = name
 
 description = description
 
 hidden = hidden
 

Static Public Attributes

Callable function [..., Awaitable[Any]]
 
list aliases [str]
 
list parameters [CommandParameter]
 

Static Protected Attributes

argparse _parser .ArgumentParser
 

Detailed Description

Definition at line 51 of file command.py.

Constructor & Destructor Documentation

◆ __init__()

None talkomatic.commands.command.Command.__init__ ( self,
str name,
str description,
list[str] aliases = [],
bool hidden = False )

Definition at line 60 of file command.py.

Member Function Documentation

◆ add_argument()

None talkomatic.commands.command.Command.add_argument ( self,
list[str] names,
str description,
Type[Union[int, float, str, bool]] data_type,
bool positional = False,
bool required = True,
int number_of_args = 1 )

Definition at line 67 of file command.py.

◆ execute()

str talkomatic.commands.command.Command.execute ( self,
User user,
str args )

Definition at line 84 of file command.py.

Member Data Documentation

◆ _parser

argparse talkomatic.commands.command.Command._parser .ArgumentParser
staticprotected

Definition at line 53 of file command.py.

◆ aliases

list talkomatic.commands.command.Command.aliases [str]
static

Definition at line 56 of file command.py.

◆ description

talkomatic.commands.command.Command.description = description

Definition at line 62 of file command.py.

◆ function

Callable talkomatic.commands.command.Command.function [..., Awaitable[Any]]
static

Definition at line 52 of file command.py.

◆ hidden

talkomatic.commands.command.Command.hidden = hidden

Definition at line 64 of file command.py.

◆ name

talkomatic.commands.command.Command.name = name

Definition at line 61 of file command.py.

◆ parameters

list talkomatic.commands.command.Command.parameters [CommandParameter]
static

Definition at line 57 of file command.py.


The documentation for this class was generated from the following file: