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 details)

Uploaded Source

File details

Details for the file Liacord-0.1.9.tar.gz.

File metadata

  • Download URL: Liacord-0.1.9.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for Liacord-0.1.9.tar.gz
Algorithm Hash digest
SHA256 f1f48a8c4f3c550b62d7787598bb7cb7b0038ea8f16a66ca2d62d5b525879aa5
MD5 1e12657ddfbd315e1367622935917ca1
BLAKE2b-256 28c5887f9d1551bc05dfdd9869dee5c166577073902a42abfd4db744e14169b1

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