A Simple Pythonic Asynchronous API wrapper for Revolt.
Project description
A simple, pythonic, and asynchronous API wrapper for Revolt.
Usage
import voltage # Import voltage.
client = voltage.Client() # Initialize the client.
@client.listen("ready") # Listen to an event.
async def on_ready():
print(f"Logged in as {client.user}")
@client.listen("message")
async def on_message(message): # Doesn't matter what you call the function.
if message.content == "-ping":
await message.channel.send("pong!") # Send a message.
elif message.content == "-embed":
embed = voltage.SendableEmbed(title="Hello World", description="This is an embed") # Create an embed.
# Reply to a message.
await message.reply(content="embed", embed=embed) # Obligatory message content.
# Run the client which is an abstraction of calling the start coroutine.
client.run("TOKEN") # Replace with your token.
For more examples check the examples folder which has a lot of useful, ready to go, and explained examples.
You can also read the code of RedCrewmate. RedCrewmate also contains a framework for commands and cogs.
Installation
Voltage is available on PyPI!
To install voltage just run:
$ pip install voltage
If you want to install the main branch which may have more features but will be more unstable you run:
$ pip install git+https://github.com/EnokiUN/voltage
Credits
Contributors, thank you :)
Revolt.py, when shit broke, that’s where I went.
Revolt.js, when the docs fail you.
Discord.py, also a really great help while making this.
Revolt development team, absolute chads.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file voltage-0.1.5a1.tar.gz
.
File metadata
- Download URL: voltage-0.1.5a1.tar.gz
- Upload date:
- Size: 46.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc3ffd6d5cc041c138fab8dd0645de167d4115e5b6f3d4119b79a3055bd88015 |
|
MD5 | 6a8e1c7083d89e56432aa9a1a36ef86d |
|
BLAKE2b-256 | 9afbf90f14e39692767f2534a91ca129a27dac049fe8c15038b0a0458d402d7f |
File details
Details for the file voltage-0.1.5a1-py3-none-any.whl
.
File metadata
- Download URL: voltage-0.1.5a1-py3-none-any.whl
- Upload date:
- Size: 57.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 787186f403a4dae5a4559fac99590f80c7e2a0f0f50744aada04a56873eda8c8 |
|
MD5 | b85a6efe52c6d88610f119eb3daa4449 |
|
BLAKE2b-256 | 28551e6cbc79236f7deef51aeae8e7b73bdc14ef27cf0264d4c1fec865de8a84 |