Metadata-Version: 2.1
Name: volt.py
Version: 0.0.1
Summary: Wrapper of discord api for discord.py. Personal project for my study.
Home-page: https://github.com/Lapis0875/volt.py
Author: Lapis0875
Author-email: lapis0875@kakao.com
License: MIT
Keywords: discord api,discord.py,discord api wrapper
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# Volt
**Volt** is yet another discord api wrapper for Python.
It supports python 3.7 +

## How to install
```shell
pip install volt
```

## Structure
### Event listener
```python
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
```python
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')
```
```python
### 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')
```


