Skip to main content

A Python wrapper for the Discord API

Project description

Diskord


This library is a maintained fork of the popular and now archived library, discord.py.

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

Key features

  • Modern Pythonic API using async / await.
  • Proper and sane rate limit handling.
  • Optimised in both speed and memory.
  • Provides full coverage of Discord API including Interactions i.e Slash Commands.
  • Prebuilt Commands building framework to aid in bot development
  • Easy-to-use object oriented design
  • Actively maintained & updated

Installation

Python 3.8 or higher is required to use this library.

Basic Installation

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

python -m pip install diskord

Voice Support

Optionally, To interact with discord's voice API, You would require voice support of this library which you can install like so:

python -m pip install diskord[voice]

Development Version

Please beware that development version is not guaranteed to be stable. There can be breaking changes and potentially critical bugs. Use with cautions.

You must have git installed to install development version. Otherwise, you can download the code.

$ git clone https://github.com/nerdguyahmad/diskord
$ cd diskord
$ python3 -m pip install -U .[voice]

Optional Packages

Linux Installation

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

Here are some quick examples to give you a quickstart and show off the basic features of the library.

Application (Slash) Commands

import diskord

client = diskord.Client()

@client.slash_command(description='Ping-Pong!')
async def ping(ctx):
    await ctx.send('Pong!')

client.run('token')

Legacy (Prefixed) Commands

import diskord
from diskord.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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

diskord-2.5.1-py3-none-any.whl (458.9 kB view details)

Uploaded Python 3

File details

Details for the file diskord-2.5.1-py3-none-any.whl.

File metadata

  • Download URL: diskord-2.5.1-py3-none-any.whl
  • Upload date:
  • Size: 458.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for diskord-2.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdc92fe9b0d4a34fcb1dc04f91be0cef830c3f6f0555da7a9b618fc3c2488930
MD5 6b4d85b2ec6ade786ca4e0e291023dd0
BLAKE2b-256 22b8093bfc6a0594aefdef996a087f7e85dbffc962a4ca2116f14214f128c27a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page