in

A discord api wrapper for Python


Volt is yet another discord api wrapper for Python. It supports python 3.8 +

How to install [Currently Not Supported.]

Speed up volt.py!

You can install extra dependencies for speeding up library.

pip install volt.py[speed]

speed extra requirements are used to speed up library. This contains uvloop for asyncio event loop speedup. Since uvloop is not supported on Windows platform, you can’t use this extra requirements on Windows. You can use wsl to use speedups on Windows!

Voice feature with volt.py [Currently Not Supported]

You can install dependencies required for voice features.

pip install volt.py[voice]

I want all extra requirements to be installed!

You can install all extra dependencies by using following command;

Planned Structure (Can be changed!)

Event listener

from volt import Client, Intents, Message

client = Client(intents=Intents.all())

@client.listen('message')
async def on_message(msg: Message):
    if not msg.author.bot:
        # echo user message
        await msg.reply(msg.content)

client.run('BOT_TOKEN')

Interaction

from volt import Client, Intents, interaction, User

client = Client(intents=Intents.all())

@client.command(
    name='greeting'
)
async def greeting_slash(ctx: interaction.Context, user: User):
    await ctx.respond(...)

client.run('BOT_TOKEN')
### Message Components
from volt import Client, Intents, interaction, components, User

client = Client(intents=Intents.all())

@client.command(
    name='greeting'
)
async def greeting_slash(ctx: interaction.Context, user: User):
    await ctx.respond(components=[
        components.ActionRow([
            components.Button(
                custom_id='my_btn',
                style=components.ButtonStyle.Primary
            )
        ])
    ])

client.run('BOT_TOKEN')

GitHub

GitHub – Lapis0875/volt.py: discord api wrapper for Python 3.8 +

discord api wrapper for Python 3.8 +. Contribute to Lapis0875/volt.py development by creating an account on GitHub.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

GIPHY App Key not set. Please check settings

Buying an iPhone 13 in some countries requires more than 3 months of work, research shows thumbnail

Buying an iPhone 13 in some countries requires more than 3 months of work, research shows

UXsniff — The user experience watchdog that looks out for you.