Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Revolt Support Server PyPi Page. Docs Status GitHub Workflow Status

A simple pythonic asynchronous API wrapper for Revolt.

Screenshot Of Starting A Bot.

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.

Commands framework example:

import voltage
from voltage.ext import commands # Import the commands module from ``voltage.ext``

client = commands.CommandsClient("-") # Create a CommandsClient (client that has commands (original ik)) with the prefix set to "-".

@client.listen("ready") # You can still listen to events.
async def ready():
    print("Gaaah, It's rewind time.")

@client.command() # Register a command using the ``command`` decorator.
async def ping(ctx):
    """Sends Pong!""" # Name and description can be passed in the decorator or automatically inferred.
    await ctx.reply("Pong") # Reply to the context's message.

client.run("TOKEN") # Again, replace with your bot token.

For more examples check the examples folder which has a lot of useful, ready to go, and explained examples.

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.

  • FatalErrorCoded, Vortex guys, carrying with voice implementation, eats chadness.

  • RGBCube, Came up with the amazing name “Voltage”.

Release files for voltage 0.1.5a8

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

Source distribution (sdist)

Source distribution for voltage 0.1.5a8
File Size Uploaded
voltage-0.1.5a8.tar.gz 50.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for voltage 0.1.5a8
File Interpreter ABI Platform
voltage-0.1.5a8-py3-none-any.whl Python 3 none any Details

Total release size: 114.9 kB

Release files / voltage-0.1.5a8.tar.gz

Download URL voltage-0.1.5a8.tar.gz
Size 50.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b9b0ee6af0297099110d86e84b048e253c17ff881e6eb5d1c4ca216e766f35ae
BLAKE2b-256 checksum
How to use checksums
0267ec5ee07660c01ab697b9e25a3ab374b358dab723cf46b3e9f84dcd069c04
Upload date
Uploaded using Trusted Publishing?
What is 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.5

Release files / voltage-0.1.5a8-py3-none-any.whl

Download URL voltage-0.1.5a8-py3-none-any.whl
Size 64.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
460cec98d76c85962b46dca54336d320497c65f5cd146edb93a7656d22072372
BLAKE2b-256 checksum
How to use checksums
efdb0feab8107d08385878085dfab0a1685fa82fe63877ed554594aabb3a2ff5
Upload date
Uploaded using Trusted Publishing?
What is 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.5
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