Skip to main content


LightDiscord

🤖 An ultra light library to develop discord bots with Python

Get lightdiscord

To install the library, you can just run the following command:

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

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

Key features

⚠️ If the size of the library and the proximity with the discord api is not absolutely necessary for you, https://github.com/Rapptz/discord.py may be a better option.

  • Easy to use and quick to learn
  • Currently the smallest alternative to discord.py
  • Support custom listeners
  • Support multiple bot instances
  • Full support for Bot and User accounts
  • Support proxies
  • Customizable user agent
  • Low level: directly interact with the discord api and manage cache as you want

How to use?

First, you need to import lightdiscord. You can then create a bot object, specify a token and optional features:

  • user: A boolean (True for user accounts, False by default)
  • listeners: A dictionnary containing your events listeners and the API endpoint
  • proxy: A proxy (None for no proxies, None by default)
  • user_agent: The user agent sent to discord
bot = lightdiscord.Bot(
    "YOUR_TOKEN", listeners={"READY": on_ready}
)

To start the bot, you need to use an async function. Here is an example with asyncio

import asyncio

async def main(loop):
    await bot.start()

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main(loop))
    loop.run_forever()

You can check https://github.com/Th0rgal/lightdiscord/blob/master/example.py

Metadata

Release files for lightdiscord 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lightdiscord 1.3.1
File Size Uploaded Provenance Actions
lightdiscord-1.3.1.tar.gz 9.8 kB Without provenance Details for lightdiscord-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lightdiscord 1.3.1
File Interpreter ABI Platform Actions
lightdiscord-1.3.1-py3-none-any.whl Python 3 none any Details for lightdiscord-1.3.1-py3-none-any.whl

Total release size: 14.8 kB

Release files / lightdiscord-1.3.1.tar.gz

Download URL lightdiscord-1.3.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7acae500aa2f9bb4f7ac3d95fe1402723877e4ec9dc5afb61a0a49a2d1bb91b1
BLAKE2b-256 checksum
How to use checksums
43886edb667dcfa4e73f7e6fcac86db88288a6db788b3b0cc25fc222cdc635b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20210325 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.8

Release files / lightdiscord-1.3.1-py3-none-any.whl

Download URL lightdiscord-1.3.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
549678f7eb5cf8271bb17e882999b35f5e70f88af1362a8f75fa3dc5b3366213
BLAKE2b-256 checksum
How to use checksums
82f5eade35110f06c7c321c1fe4bf6d0eb878283066361255b3119c0743f08ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20210325 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.8

Security for lightdiscord 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page