Skip to content

star0202/dibug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0f74c96 · Jul 29, 2024

History

96 Commits
Mar 2, 2024
Jun 4, 2023
Jul 18, 2023
Jul 18, 2023
Jun 4, 2023
Jun 3, 2023
Jun 6, 2023
Jun 3, 2023
Jul 19, 2023
Jul 29, 2024
Jul 29, 2024
Jun 4, 2023

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