Official BotGate module for reporting Discord bot stats automatically
Project description
@botgate/botgate-stats-reporter-py
O módulo oficial do BotGate para desenvolvedores de bots Discord em Python. Automatize o envio de estatísticas para a plataforma de forma simples e eficiente.
📦 Instalação
pip install botgate-stats-reporter
🚀 Como usar
A biblioteca foi projetada para ser integrada facilmente ao discord.py. Ela gerencia automaticamente o intervalo de postagem com base no plano (Tier) do seu bot.
Exemplo Básico (discord.py)
import discord
from discord.ext import commands
from botgate_reporter import BotGateReporter
class MyBot(commands.Bot):
def __init__(self):
super().__init__(command_prefix="!", intents=discord.Intents.default())
# Inicializa o Reporter
self.reporter = BotGateReporter(
bot_id="SEU_BOT_ID",
api_key="SUA_API_KEY",
lang="pt-BR",
debug=True
)
async def setup_hook(self):
# Inicia o loop automático
self.reporter.start(self)
bot = MyBot()
bot.run("TOKEN_DO_DISCORD")
⚙️ Configuração
O BotGateReporter aceita as seguintes opções:
| Propriedade | Tipo | Padrão | Descrição |
|---|---|---|---|
bot_id |
string |
Obrigatório | O ID do seu bot no Discord. |
api_key |
string |
Obrigatório | Sua API Key obtida no painel do BotGate. |
lang |
string |
"pt-BR" |
Idioma dos logs e erros (pt-BR ou en-US). |
debug |
boolean |
False |
Ativa logs detalhados no console para depuração. |
🛠️ Métodos
start(client): Inicia o serviço integrado ao bot.stop(): Interrompe os envios.post_stats(): Força um envio manual imediato.
🔗 Links Úteis
📄 Licença
Distribuído sob a licença MIT.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file botgate_stats_reporter_py-1.0.0.tar.gz.
File metadata
- Download URL: botgate_stats_reporter_py-1.0.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21e8216dbd03474befa8760627077c0efe3be3def01d1802a4734bb00c65965b
|
|
| MD5 |
9a7c1277acedd58fc8cc9c820d2ca273
|
|
| BLAKE2b-256 |
659c42a275eedf49bd50cda87f025541513294ad01b187163ab42ac98be95f3b
|
File details
Details for the file botgate_stats_reporter_py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: botgate_stats_reporter_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28392ee7de594a056b36cd11131863e2a657e26bcf53d6d4bbdba0304f6334a2
|
|
| MD5 |
36801adb64a2825d678ca260172f425f
|
|
| BLAKE2b-256 |
2b0ca39c46cf949bf2e6a874f503d8f6747b704e933526218467a10316892c25
|