AsyncBot
File that stores the main bot runner code
-
class replit_bot.AsyncBot.Bot(token: str = None, prefix: str = '/', bio: str = '', allow_api: bool = False, api_path: str = '/api')
Bases: Client
Main (Async) 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
-
async default(func)
-
async fallback_param_not_included_case(func)
-
async follower(func)
-
async 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)
-
async 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
-
async 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.AsyncBot.Button(user: str, command: str)
Bases: object
-
async get_choice()