Skip to main content

FastDC: A fast, modular, and AI-integrated Discord bot framework.

Project description

⚡ FastDC

FastDC Banner

FastDC is a lightweight and powerful Python library designed to help you build Discord bots effortlessly. With built-in support for command handling, AI chat, bot training, and more, FastDC helps you go from idea to implementation in seconds.


📦 Installation

Install FastDC via pip:

pip install fastdc

🚀 Quick Start

from fastdc import FastBot

bot = FastBot(token="YOUR_DISCORD_TOKEN")

# Auto-reply feature
bot.auto_reply(trigger="hi", response="Hello!")

# Enable AI chat with Groq API
bot.ai_chat(api_key_usr="YOUR_GROQ_API_KEY")

# Train the bot from a local file
bot.train_bot()  # Make sure 'data_train.txt' exists

# Welcome and leave notifications
bot.welcome_member()
bot.leave_member()

# Run the bot
bot.run()

💬 Discord Commands

Command Description
!askbot {question} Ask a question based on trained data (data_train.txt)
!ai {prompt} Interact with an AI using Groq API

🔑 Discord Bot Token Setup

To create your bot, follow these steps:

  1. Go to the Discord Developer Portal.

  2. Create a new application and add a bot.

  3. Enable all Privileged Gateway Intents.

    Enable Intents


🧠 Groq AI API Key

To use the !ai command, you'll need an API key from Groq:


📁 Training Your Bot

The train_bot() method allows your bot to respond based on your own dataset.
Simply create a file named data_train.txt in your project root with Q&A pairs.

Example format:

Q: What is FastDC?
A: FastDC is a Python library for creating Discord bots quickly.

👋 Member Join & Leave Events

Welcome and farewell messages are built-in.

bot.welcome_member()
bot.leave_member()

These functions send automatic messages to the system channel when members join or leave the server:

  • welcome_member()"Hello {username}, Welcome to Server!"
  • leave_member()"{username} has left the server 🖐️"

👀 Preview

FastDC Bot on discord

🙌 Contribution

Contributions are welcome!
If you have ideas for improvements or new features, feel free to open an issue or submit a pull request.


📄 License

Licensed under the MIT License.


❤️ Support

If you like this project, consider giving it a ⭐ on GitHub or sharing it with others!


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

fastdc-1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

fastdc-1.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file fastdc-1.1.tar.gz.

File metadata

  • Download URL: fastdc-1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for fastdc-1.1.tar.gz
Algorithm Hash digest
SHA256 57b115360867bb1f1d73f0ada75f9c140037d8488c832ee25332a46cf6a0a5da
MD5 139ed8cb6020394c66d462d7d8982530
BLAKE2b-256 19d44300a29d5d6ce82388f122cc8bb3fb3b5e60bb4cf34b9dc2de59c1324164

See more details on using hashes here.

File details

Details for the file fastdc-1.1-py3-none-any.whl.

File metadata

  • Download URL: fastdc-1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for fastdc-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa29577aaafa8b931a39e8a5fee90d98d841da7ba8951049cdd2651b333edbb7
MD5 e59cc7b3b0babdc8e4eb2d365a42963b
BLAKE2b-256 4b5ea1ed5b49f657f93273be89a049e46a15bfd5aee9bb1496cb347edfd0bfc8

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