All Projects → Rapptz → Discord.py

Rapptz / Discord.py

Licence: mit
An API wrapper for Discord written in Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Discord.py

Discordrb
Discord API for Ruby
Stars: ✭ 651 (-92.95%)
Mutual labels:  discord-api, discord
Disgord
Go module for interacting with the documented Discord's bot interface; Gateway, REST requests and voice
Stars: ✭ 277 (-97%)
Mutual labels:  discord-api, discord
Nostrum
Elixir Discord Library
Stars: ✭ 274 (-97.03%)
Mutual labels:  discord-api, discord
Disco
Discord Python library for people that like to dance
Stars: ✭ 242 (-97.38%)
Mutual labels:  discord-api, discord
Javacord
An easy to use multithreaded library for creating Discord bots in Java.
Stars: ✭ 368 (-96.02%)
Mutual labels:  discord-api, discord
discord-ui
A discord.py extension for sending, receiving and handling ui interactions in discord
Stars: ✭ 28 (-99.7%)
Mutual labels:  discord, discord-api
Dsharpplus
A .NET Standard library for making bots using the Discord API.
Stars: ✭ 635 (-93.13%)
Mutual labels:  discord-api, discord
Discord Py Slash Command
A simple discord slash command handler for discord.py.
Stars: ✭ 183 (-98.02%)
Mutual labels:  discord-api, discord
Discordia
Discord API library written in Lua for the Luvit runtime environment
Stars: ✭ 340 (-96.32%)
Mutual labels:  discord-api, discord
Xiao
Xiao is a Discord bot coded in JavaScript with discord.js using the Commando command framework. With over 500 commands, she is one of the most feature-rich bots out there. Formerly XiaoBot.
Stars: ✭ 302 (-96.73%)
Mutual labels:  discord-api, discord
Raid Toolbox
Raid ToolBox (RTB) is a big toolkit of Spamming/Raiding/Token management tools for discord.
Stars: ✭ 211 (-97.72%)
Mutual labels:  discord-api, discord
Commando
Official command framework for discord.js
Stars: ✭ 434 (-95.3%)
Mutual labels:  discord-api, discord
Kord
Idiomatic Kotlin Wrapper for The Discord API
Stars: ✭ 203 (-97.8%)
Mutual labels:  discord-api, discord
Discordeno
Discord API library for Deno
Stars: ✭ 254 (-97.25%)
Mutual labels:  discord-api, discord
Aegis.cpp
Discord C++ library for interfacing with the API. Join our server:
Stars: ✭ 198 (-97.86%)
Mutual labels:  discord-api, discord
Discord Api Docs
Official Discord API Documentation
Stars: ✭ 3,855 (-58.27%)
Mutual labels:  discord-api, discord
Sword
Discord library for Swift
Stars: ✭ 166 (-98.2%)
Mutual labels:  discord-api, discord
Discordrpcmaker
Cross-platform Discord Rich Presence Maker, WITH BUTTONS!
Stars: ✭ 165 (-98.21%)
Mutual labels:  discord-api, discord
Multistreamer
[discontinued] A webapp for publishing video to multiple streaming services at once.
Stars: ✭ 281 (-96.96%)
Mutual labels:  discord-api, discord
Lightcord
A simple - customizable - Discord Client
Stars: ✭ 366 (-96.04%)
Mutual labels:  discord-api, discord

discord.py

Discord server invite PyPI version info PyPI supported Python versions

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.

The Future of discord.py

Please read the gist for the future of this project. It's been a good one.

Key Features

  • Modern Pythonic API using async and await.
  • Proper rate limit handling.
  • Optimised in both speed and memory.

Installing

Python 3.8 or higher is required

To install the library without full voice support, you can just run the following command:

# Linux/macOS
python3 -m pip install -U discord.py

# Windows
py -3 -m pip install -U discord.py

Otherwise to get voice support you should run the following command:

# Linux/macOS
python3 -m pip install -U "discord.py[voice]"

# Windows
py -3 -m pip install -U discord.py[voice]

To install the development version, do the following:

$ git clone https://github.com/Rapptz/discord.py
$ cd discord.py
$ python3 -m pip install -U .[voice]

Optional Packages

Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g. apt, dnf, etc) before running the above commands:

  • libffi-dev (or libffi-devel on some systems)
  • python-dev (e.g. python3.6-dev for Python 3.6)

Quick Example

import discord

class MyClient(discord.Client):
    async def on_ready(self):
        print('Logged on as', self.user)

    async def on_message(self, message):
        # don't respond to ourselves
        if message.author == self.user:
            return

        if message.content == 'ping':
            await message.channel.send('pong')

client = MyClient()
client.run('token')

Bot Example

import discord
from discord.ext import commands

bot = commands.Bot(command_prefix='>')

@bot.command()
async def ping(ctx):
    await ctx.send('pong')

bot.run('token')

You can find more examples in the examples directory.

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].