Wumpy-bot
Easy to use high abstraction over other Wumpy subpackages.
This is the most beginner-friendly way to use Wumpy, and provides all features
of the Discord API. This is the primary package installed from PyPI when you
only specify wumpy.
Getting started
All official Wumpy projects prioritise both asyncio and Trio support so you can run the bot under either:
import anyio
from wumpy.bot import Bot
bot = Bot('ABC123.XYZ789') # Replace with your token and keep it safe!
# This runs the bot with Trio as the event loop (recommended),
# use backend='asyncio' to run it under asyncio.
anyio.run(bot.run, backend='trio')
Registering listeners
Continuing from the previous code, you can register listeners for Discord events using Wumpy's rich event listeners:
import anyio
from wumpy.bot import Bot
from wumpy.bot.events import MessageDeleteEvent
bot = Bot('ABC123.XYZ789')
@bot.listener()
async def log_deleted_messages(event: MessageDeleteEvent):
print(f'Message {event.message_id} in {event.channel_id} was deleted')
anyio.run(bot.run, backend='trio')
The listener is registered with the @bot.listener() decorator, which tells
Wumpy to read the annotation of the first parameter (name does not matter, but
here it is called event) and register that function for the type of event
that it is typehinted as.
Metadata
Release files for wumpy-bot 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wumpy-bot-0.1.0.tar.gz | 17.5 kB | Without provenance | Details for wumpy-bot-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wumpy_bot-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for wumpy_bot-0.1.0-py3-none-any.whl |
Total release size: 38.5 kB
Release files / wumpy-bot-0.1.0.tar.gz
| Download URL | wumpy-bot-0.1.0.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa317d6ccb008fa7643c9eac02957a4570dae66ff58597883b8b2f115afef587
|
|
BLAKE2b-256 checksum How to use checksums |
e4b98576bf1288f57c82ed33722717f85d8a17211d4f539956a7f3f70357ad11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Release files / wumpy_bot-0.1.0-py3-none-any.whl
| Download URL | wumpy_bot-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
adf4ef086676b759121b5741fb24a72d2fdf8a9912d7d29bcea94a78eef234e7
|
|
BLAKE2b-256 checksum How to use checksums |
64a28b31182877806a476927294e2ccf16f9ef25656de4a9ca0d214319b36075
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Security for wumpy-bot 0.1.0
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.