Skip to content

star0202/dibug

Repository files navigation

GitHub Workflow Status (with branch) GitHub PyPI PyPI - Python Version

dibug

Debugging Tool for discord.py

Installation

Python 3.10+ is required

pip install dibug

Usage

from discord import Client, Intents, Message

from dibug import Dibugger

owners = [1234567890]  # owners id


async def user_has_perm(msg: Message) -> bool:
    return msg.author.id in owners


async def no_perm(msg: Message) -> None:
    await msg.reply("You don't have permission to use this command.")


intents = Intents.default()
intents.message_content = True  # dibug requires message content intent

bot = Client(intents=intents)
Dibugger.attach(bot, user_has_perm, no_perm)

bot.run("token")

Commands

Default Prefix: !dbg

  • <prefix> info | i: Show bot info

  • <prefix> eval | e | python | py <code>: Evaluate python code

  • <prefix> kill | k | shutdown: Kill bot process

  • <prefix> shell | sh <code>: Execute shell command