A Simple Pythonic Asynchronous API wrapper for Revolt.
import voltage
client = voltage.Client()
@client.listen('ready')
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!')
if message.content == '-embed':
embed = voltage.SendableEmbed(title="Hello World", description="This is an embed")
await message.reply(content="embed", embed=embed) # Obligatory message content.
client.run("TOKEN")
For more examples check the examples folder which has alot of useful, ready to go, explained examples.
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
Note
Python 3.8 or higher is required to install voltage.
Installing from GitHub requires the git cli to be available on your machine.
- Contributers, 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.