The Discord bot framework for Python

Overview

Pycordia

⚠️ Note!

As of now, this package is under early development so functionalities are bound to change drastically.

We don't recommend you currently use Pycordia in a production environment.

A work-in-progress Discord API wrapper for Python with a simple gateway and some common events implemented.

While there's currently no documentation available, use the examples for guidance. If you have any questions, feel free to join our Discord server to follow the changes we make, as well as receive help and talk with others!

Our examples (and future documentation) assume you're at a level of Python where you can comfortably work with Discord bots.

⚙️ Installation

Pycordia has been well tested on Python 3.8, however, 3.7 and above are supported.

Installing from PIP

The easiest way to get Pycordia on your system is by installing it through pip.

$ pip install pycordia               # Should work everywhere
$ pip3 install pycordia              # Should work on most *nix systems; use on MacOS
$ python -m pip install pycordia     # Alternative; should work everywhere
$ python3 -m pip install pycordia    # Alternative; use on MacOS
$ py -3 -m pip install pycordia      # Alternative; use on Windows

Installing from Source

If you prefer installing Pycordia from source, proceed with the following:


First, clone this repository either through Git or Github.

Next, proceed to run the setup.py file as in:

$ python setup.py sdist     # Should work everywhere
$ python3 setup.py sdist    # Should work on most *nix systems; use on MacOS
$ py -3 setup.py sdist      # Should work on Windows

cd into the new dist directory and run the created .tar.gz file.

$ pip install pycordia-<version>.tar.gz         # Should work everywhere
$ pip3 install pycordia-<version>.tar.gz        # Should work on most *nix systems; use on MacOS
$ python -m pip install pycordia-....tar.gz     # Alternative; should work everywhere
$ python3 -m pip install pycordia-....tar.gz    # Alternative; use on MacOS
$ py -3 -m pip install pycordia-....tar.gz      # Alternative; use on Windows

🏓 Example of a simple Ping-Pong Bot

from pycordia import events, models
import pycordia
import dotenv
import os

dotenv.load_dotenv()
client = pycordia.Client(intents=pycordia.Intents.all())

@client.event
async def on_ready(event: events.ReadyEvent):
    print(f"{event.user} ready to do stuff!", client.intents)

@client.event
async def on_message_create(msg: models.Message):
    if msg.author.bot or not msg.content:
        return

    if msg.content.startswith(".ping"):
        embed = models.Embed.create(description=":ping_pong: Pong!")
        embed.color = 0xFF123A

        await models.Message.create(client, embeds=[embed]).send(msg.channel_id)

client.run(os.getenv("DISCORD_TOKEN"))

Events

  • on_ready: events.ReadyEvent
  • on_message_create: models.Message
  • on_typing_start: events.TypingStartEvent
  • on_message_delete, on_message_delete_bulk: events.MessageDeleteEvent
  • on_message_update: models.Message
  • on_channel_create, on_channel_update, on_channel_delete: models.Channel

For all other undocumented events, you'll receive raw JSON data which you'll have to handle yourself.

🔖 Things to do

  • Improve currently available models
  • Add slash commands
  • Add all other event wrappers

📖 Contribute

Feel free to contribute any bug fixes, new features, or general improvements to the Pycordia project.

You might also like...
Anime-Discord-Bot - Lightweight anime searching Discord bot supported by the AnilistPython library (anilist.co APIv2 wrapper))
VoiceMaster-Discord-Bot - Fork from original Discord bot with max channel limit, staff role and more

VoiceMaster VoiceMaster is a discord bot created to change the way servers work,

A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.
A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

Aqui está disponível GRATUITAMENTE, um bot de discord feito em python, saiba que, terá que criar seu bot como aplicação, e utilizar seu próprio token, e lembrando, é um bot básico, não se utiliza Cogs nem slash commands nele!

BotDiscordPython Aqui está disponível GRATUITAMENTE, um bot de discord feito em python, saiba que, terá que criar seu bot como aplicação, e utilizar s

MusicBot is the original Discord music bot written for Python 3.5+, using the discord.py library
MusicBot is the original Discord music bot written for Python 3.5+, using the discord.py library

The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)

Michelle is a Discord Bot coded in Python with Discord.py by Mudit07.
Michelle is a Discord Bot coded in Python with Discord.py by Mudit07.

Michelle is a Discord Bot coded in Python with Discord.py by Mudit07.

Zero2 Discord bot is written with Discord.py using Python.
Zero2 Discord bot is written with Discord.py using Python.

Zero2 Discord bot is written with Discord.py using Python.

Barbot is a discord bot made from discord.py and python, barbot is most to fun and roleplay for servers!
Barbot is a discord bot made from discord.py and python, barbot is most to fun and roleplay for servers!

BarBot Main source of barbot Overview Barbot is a discord bot made from discord.py and python, barbot is most to fun and roleplay for servers! Links i

Comments
  • Revert the previous PR

    Revert the previous PR

    Setup:

    1. Delete the gh-pages branch, and create a new gh-pages orphan branch
    2. Create a personal access token in settings
    3. Create a new secret by the name of ACCESS_TOKEN in this repository, and set its value to the token
    4. Configure Github Pages to serve files from the root folder of the gh-pages branch
    5. Change the github repository in line 5 of the sphinx-build.yml workflow

    Once you commit your changes, the workflow should run again, and commit the docs to gh-pages. LMK if anything breaks! 😄

    opened by classPythonAddike 0
  • Added documentation workflow

    Added documentation workflow

    Added a documentation workflow, which uses sphinx to build the docs.

    What it does -

    • Installs git, python and clones the repo to a container
    • Installs packages from the requirements.txt
    • Builds the docs, removes unnecessary files, like source code, requirements.txt, setup.py, etc
    • Configures git
    • Then pushes the docs to the gh-pages branch, using a personal access token for auth

    Setup:

    1. Delete the gh-pages branch, and create a new gh-pages orphan branch
    2. Create a personal access token in settings
    3. Create a new secret by the name of ACCESS_TOKEN in this repository, and set its value to the token
    4. Configure Github Pages to serve files from the root folder of the gh-pages branch
    5. Change the github repository in line 5 of the sphinx-build.yml workflow

    Once you commit your changes, the workflow should run again, and commit the docs to gh-pages. LMK if anything breaks! 😄

    opened by classPythonAddike 0
  • Improved message caching, split up examples and added channel events

    Improved message caching, split up examples and added channel events

    Implemented the Channel model, and added wrappers for -

    1. CHANNEL_CREATE
    2. CHANNEL_UPDATE
    3. CHANNEL_DELETE

    I also improved the message caching - (checking to see if the cache has reached the size limit, before adding a message into it)

    I did test out these, and they all worked :eyes: lmk if something doesn't function as expected!

    opened by classPythonAddike 0
  • New features

    New features

    Ello :smilecat:

    Features I added -

    1. Added a user and guilds attribute to the Client class
    2. Added __repr__ methods for some of the classes
    3. Declared constants to house the api, cdn, and websocket url
    4. Also made it possible to get user info from their id

    LMK if you want any changes to be implemented, hope you like it! :smilecatadidas:

    opened by classPythonAddike 0
Releases(0.2.1)
  • 0.2.1(Nov 3, 2021)

    After a while of no updates, version 0.2.1 is here. It adds some general improvements and other quality-of-life things.

    Notable features

    • Client.on() decorator; another way of doing Client.register_events
    • Client.get_* methods; another way of using the respective model's from_id methods
    • User.created_on: check when an user was created
    • Typehinting fixes; this should make Pycordia fair better with certain linters and tools.
    • Other general improvements and minor fixes
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Oct 5, 2021)

    This is the first major release of Pycordia. It introduces many changes related to performance, models, and other things.

    • Errors and representations are clearer
    • No longer required to provide Client to models
    • Support for multiple event handlers (for same event)

    The full list of changes can be found here

    Source code(tar.gz)
    Source code(zip)
  • 0.1.2(Sep 20, 2021)

    This update contains a general improvement to the websocket. It now implements compression and works far more reliably than in previous versions.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Sep 12, 2021)

    This is a minor update that fixes some bugs:

    • Migrated from await to asyncio.gather for events, this allow the events to be truly asynchronous.
    • Other general improvements
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Sep 11, 2021)

    This is the first semi-stable release of Pycordia. It includes the most common features of a bot, including event handling, message creation, embeds, updates, and more.

    Source code(tar.gz)
    Source code(zip)
Owner
Ángel Carias
Developer and designer.
Ángel Carias
A Python interface between Earth Engine and xarray for processing weather and climate data

wxee What is wxee? wxee was built to make processing gridded, mesoscale time series weather and climate data quick and easy by integrating the data ca

Aaron Zuspan 160 Dec 31, 2022
Automatically changes your discord status

Automatically changes your discord status, Be careful as this may get you rate limited and banned

octo 5 Sep 20, 2022
An powerfull telegram group management anime themed bot.

ErzaScarlet Erza Scarlet is the female deuteragonist of the anime/manga series Fairy Tail. She is an S-class Mage from the Guild Fairy Tail. Like most

ꜱōʜᴇʀᴜ ᴋāɴ (AKA) ꜱᴏʜᴀɪʟ ᴋʜᴀɴ 2 May 19, 2022
UNLIMITED CALL AND SMS BOMBING PYTHON SCRIPT

cc_sim_crack v.1 An open-source SMS/call bomber for Linux And Termux. Note: Due misusing of cc_sim_crack, several API's died. Don't be afraid if you d

CYBER CRACKER OFFICIAL 3 Jul 05, 2021
This is a starter template of discord.py project

Template Discord.py This is a starter template of discord.py project (Supports Slash commands!). 👀 Getting Started First, you need to install Python

1 Dec 22, 2021
A Discord bot themed around the Swedish heavy metal band Sabaton! (Python)

A Discord bot themed around the Swedish heavy metal band Sabaton! (Python)

Evan Lundberg 1 Nov 29, 2021
Userbot Telegram + Music Voice Chats. Dibuat Untuk Bersenang - Senang , Dan Mempermudah Kegiatan. Created By Rio.

RIO - USERBOT Disclaimer Saya tidak bertanggung jawab atas penyalahgunaan bot ini. Bot ini dimaksudkan untuk bersenang-senang sekaligus membantu Anda

RioProjectX 1 Nov 10, 2021
An opensource chat service that cares about your privacy.

An opensource chat service that cares about your privacy. Instructions to set up a local testing environment: 1) Clone this repository and navigate to

Aiman Al Masoud 2 Dec 03, 2022
Creates Spotify playlists from Spinitron playlists.

spin2spot Creates Spotify playlists from Spinitron playlists. Quick Start You can use spin2spot as a command-line tool: Erik Didriksen 1 Aug 28, 2021

Starlink Order Status Notification

Starlink Order Status Notification This script logs into Starlink order portal, pulls your estimated delivery date and emails it to a designated email

Aaron R. 1 Jul 08, 2022
Provide fine-grained push access to GitHub from a JupyterHub

github-app-user-auth Provide fine-grained push access to GitHub from a JupyterHub. Goals Allow users on a JupyterHub to grant push access to only spec

Yuvi Panda 20 Sep 13, 2022
Tools ini hanya bisa digunakan untuk menyerang website atau http/s

☢️ Tawkun DoS ☢️ Tools ini hanya bisa digunakan untuk menyerang website atau http/s FITUR: [ ☯️ ] Proxy Mode [ 🔥 ] SOCKS Mode | Kadang Eror [ ☢️ ] Ht

Bandhitawkunthi 9 Jul 19, 2022
A Powerful telegram giveawayz bot based on the python-telegram-bot API

GiveawayZ Bot A Powerful telegram giveawayz bot based on the python-telegram-bot API. Powered by Team Zyntax and Team DFX Developed by @Zycho-Dev A pr

Zycho #AFK 5 Jul 31, 2022
Read manga from your favourites websites on telegram.

tg-manga-bot Read manga from your favourites websites on telegram. Current Development Bot @idkpythonbot Telegram Channel tg_manga_bot Commands start

Daniel Rivero 41 Dec 22, 2022
Hello i am TELEGRAM GROUP MANAGEMENT BOT MY NAME IS Evil-Inside ⚡ i have both amazing modules

Evil-Inside DEMO BOT - Evil-Inside Hello i am TELEGRAM GROUP MANAGEMENT BOT MY NAME IS Evil-Inside ⚡ i have both amazing modules ℂ𝕆ℕ𝕋𝔸ℂ𝕋 𝕄𝔼 𝕆ℕ

PANDITHAN 52 Nov 20, 2022
Get charts, top artists and top songs WITHOUT LastFM API

LastFM Get charts, top artists and top songs WITHOUT LastFM API Usage Get stats (charts) We provide many filters and options to customize. Geo filter

4 Feb 11, 2022
Image-Bot-Discord - This Is a discord bot that shows the specific image you search from Google

Advanced Discord.py Image Bot CREDITS Made by RLX and Mathiscool README by Milrato Installation Guide in .env Adjust the TOKEN python main.py to start

RLX 3 Jan 16, 2022
Telegram Reporter

[Telegram Reporter v.3 ] 🇮🇷 AliCybeRR 🇮🇷 [ AliCybeRR.Reporter feature ] Login Your Telegram account 👽 support Termux ❕ No Limits ⚡ Secure 🔐 Free

AliCybeRR 1 Jun 08, 2022
Python script to harvest tweets with the Twitter API V2 Academic Research Product Track

Tweet harvester Python script to scrape, collect, and/or harvest tweets with the Twitter API V2 Academic Research Product Track. Important note: In or

Thomas Frissen 2 Nov 11, 2021
A python wrapper for interacting with the LabArchives API.

LabArchives API wrapper for Python A python wrapper for interacting with the LabArchives API. This very simple package makes it easier to make arbitra

Marek Cmero 3 Aug 01, 2022