Skip to main content

A Simple Pythonic Asynchronous API wrapper for Revolt.

Project description

Revolt Support Server PyPi Page. Docs Status GitHub Workflow Status

A simple, pythonic, and 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.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voltage-0.1.5a1.tar.gz (46.7 kB view hashes)

Uploaded Source

Built Distribution

voltage-0.1.5a1-py3-none-any.whl (57.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page