vcokltfre/template-bot-v2
A rewrite of TemplateBot with improvements
Usage:
from templatebot import Bot
bot = Bot(name="MyBot", command_prefix="!")
bot.load_initial_cogs() # Required, even when empty, to load the default cog and jishaku
bot.run("token")
Logging
The bot has two types of logging, synchronoush and asynchronous. Generally speaking you will want to use async logging, since it won't block while you're running the bot, however if you're logging something before running the bot, you may want to use the sync methods. These methods can be accessed through templatebot.Bot.logger
class WebhookLogger:
...
## Synchronous methods
def debug_s(self, content):
self.send("debug", content)
def info_s(self, content):
self.send("info", content)
def warn_s(self, content):
self.send("warn", content)
def error_s(self, content):
self.send("error", content)
def critical_s(self, content):
self.send("critical", content)
## Asynchronous methods
async def debug(self, content):
await self.send_async("debug", content)
async def info(self, content):
await self.send_async("info", content)
async def warn(self, content):
await self.send_async("warn", content)
async def error(self, content):
await self.send_async("error", content)
async def critical(self, content):
await self.send_async("critical", content)
Metadata
Release files for templatebot 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| templatebot-1.0.3.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| templatebot-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / templatebot-1.0.3.tar.gz
| Download URL | templatebot-1.0.3.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2caf725ed7819aef9ebfe0ddf72b1d1aeeadcd30c00bfea0155737c9218ad07d
|
|
BLAKE2b-256 checksum How to use checksums |
faf7ccb702748763cd7872cab02b28be710984ae67afec6bc7d98fa29575f1d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
|
Release files / templatebot-1.0.3-py3-none-any.whl
| Download URL | templatebot-1.0.3-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b611520fe563fe9a9a7749a322be2ae4f710a94c32d77b8b489676eed4bdd07c
|
|
BLAKE2b-256 checksum How to use checksums |
a10081c05713bd2398dcb9b91c7145652edaf1ccf24e7e43375cf7c0527543d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
|