Volt
Volt is yet another discord api wrapper for Python. It supports python 3.7 +
How to install
pip install volt
Structure
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')
Slash Commands
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')
Release files for volt.py 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| volt.py-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / volt.py-0.0.1-py3-none-any.whl
| Download URL | volt.py-0.0.1-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
562121bc58e587d98a32de0094af5ef79a7c27aa659dac58460b275b6332addc
|
|
BLAKE2b-256 checksum How to use checksums |
0c92b7aea3f273005c193d98143d67719b243ae17fa352a1cb2557e9b03b56ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5
|