Skip to main content

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

botgate_stats_reporter_py-1.0.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

botgate_stats_reporter_py-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file botgate_stats_reporter_py-1.0.0.tar.gz.

File metadata

File hashes

Hashes for botgate_stats_reporter_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 21e8216dbd03474befa8760627077c0efe3be3def01d1802a4734bb00c65965b
MD5 9a7c1277acedd58fc8cc9c820d2ca273
BLAKE2b-256 659c42a275eedf49bd50cda87f025541513294ad01b187163ab42ac98be95f3b

See more details on using hashes here.

File details

Details for the file botgate_stats_reporter_py-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for botgate_stats_reporter_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28392ee7de594a056b36cd11131863e2a657e26bcf53d6d4bbdba0304f6334a2
MD5 36801adb64a2825d678ca260172f425f
BLAKE2b-256 2b0ca39c46cf949bf2e6a874f503d8f6747b704e933526218467a10316892c25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page