Skip to main content

🚀 Introducing Barrel – The Ultimate Discord Bot Package! 🚀

Barrel is a lightweight and powerful custom Discord bot package designed for simplicity and efficiency. With Barrel, you can easily manage commands, handle errors, and customize your bot's interactions with Discord's API.

✨ Features:

  • Custom Commands: Easily add and manage commands for your bot.
  • Seamless Integration: Connects smoothly with Discord’s API.
  • Error Handling: Built-in error handling to ensure smooth operation.
  • Embed Support: Create and send rich embeds for enhanced message formatting.
  • Latency Checking: Built-in command to check the bot's latency.

📦 Installation

To install Barrel, use pip:

pip3 install barrel.py

🛠 Usage Instructions

1. Basic Setup

Create a new Python file for your bot, e.g., main.py.

# main.py
from barrel import Bot  # Importing the Bot class

# Initialize the bot (create an instance of the Bot class)
barrel_bot = Bot(command_prefix="!")  # Command prefix defaults to "!" if not provided

# Register a simple command
@barrel_bot.command()
async def greet(ctx):
    """Command to greet users with an embed."""
    title = "Greetings from BarrelBot!"
    description = "This is a message sent using an embed."
    await barrel_bot.send_embed(ctx, title, description)

@barrel_bot.command()
async def my_command(ctx):
    await ctx.send("This is a custom command!")

# Run the bot with your bot token
barrel_bot.run('YOUR_BOT_TOKEN_HERE')  # Replace with your actual bot token

2. Adding Custom Commands

To add custom commands to your bot:

Define a command using the @barrel_bot.command() decorator:

# main.py
@barrel_bot.command()
async def my_command(ctx, *args):
    """Your custom command description."""
    # Your command logic here
    await ctx.send("This is a custom command!")

3. Running the Bot

To run your bot:

Make sure your main.py includes:

# main.py
if __name__ == "__main__":
    barrel_bot.run('YOUR_BOT_TOKEN_HERE')  # Replace with your actual bot token

Execute your script:

python3 main.py

Feel free to replace 'YOUR_BOT_TOKEN_HERE' with your actual bot token when running the bot.

Metadata

Release files for barrel.py 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for barrel.py 0.4
File Size Uploaded
barrel_py-0.4.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for barrel.py 0.4
File Interpreter ABI Platform
barrel.py-0.4-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / barrel_py-0.4.tar.gz

Download URL barrel_py-0.4.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4e8fd28cbe85df56ce721b76f95149ec3c20bb54e1d9caaaf03347596d8b9718
BLAKE2b-256 checksum
How to use checksums
bcc767d592e106a08f455adf4cb646edd41b11540f1ee0417161c521141a51cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / barrel.py-0.4-py3-none-any.whl

Download URL barrel.py-0.4-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3987eac07d168ff5ffb6adb722acf07ba65e88cdcbb7df4b530cdfea0844d802
BLAKE2b-256 checksum
How to use checksums
cca22fb9c1016528d9c7f1fa75dc0a401f7270d0923b00e46f4fb5977f59c8f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.4 This release

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page