Skip to main content

A Python wrapper for the Discord API

Project description

Liacord

Discord server invite PyPI version info PyPI supported Python versions Commit activity

Key Features

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

Python 3.8 or higher is required

Installing

# Linux/macOS
python3 -m pip install -U Liacord

# Windows
py -3 -m pip install -U Liacord
    

Bot Example

import asyncio
from Liacord import Client, Intents

intents = Intents().all()
client = Client("your_token_here", prefix="#", intents=intents)

@client.command(name="name")
async def hello(ctx):
 await ctx.send(f"{ctx.author.name}")

@client.command(name="ping")
async def ping(ctx):
 await ctx.send(f"pong {round(client.latency)}ms.")

@client.command(name='server_id', brief='get the server id')
async def server_id_command(ctx):
 server_id = ctx.guild.id
 await ctx.send(f"server id: {server_id}")

loop = asyncio.get_event_loop()
loop.run_until_complete(client.run())

You can find more examples in the examples directory There.

Links


Discord Server вЃ• Discord Developers


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

Liacord-0.1.9.tar.gz (5.4 kB view hashes)

Uploaded Source

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