Bot#

File that stores the main bot runner code

class replit_bot.bot.Bot(token: str = None, prefix: str = '/', bio: str = '', allow_api: bool = False, create_docs: bool = True, api_path: str = '/api')#

Bases: Client

Main bot object

command(name: str, thread: bool = False, desc: str = None, alias: List[str] = [])#

Takes in args

create_docs() None#

Automatically creates the documentation for the bot

default(func)#
fallback_param_not_included_case(func)#
follower(func)#
get_kwargs(resp: Dict[str, Any], given_params: Dict[str, Any]) Tuple[Dict[str, Any], bool]#

Get arguements based on type hints of function

listener(name: str, thread: bool = False, desc: str = None)#
parse_command(command: str)#

Parses command

@Example-Bot /say message:hi! -> ``` {

“options”: {

“message”: “hi!”

}, “ping statement”: “@Example-Bot”, “command”: “hello”

}#

run(auto_create_docs: bool = True, token: str = None) None#

Mainest runner code

valid_command(resp: Dict[str, Any]) Tuple[bool, Dict[str, Any]]#

Validates command. Returns true if is valid (True, parsed_json) or false if not (False, {‘None’: None})

class replit_bot.bot.Button(user: str, command: str)#

Bases: object

get_choice()#