A command handler/dispatcher webserver for Discord slash commands
Project description
vcokltfre/SlashPatch
A command handler/dispatcher webserver for Discord slash commands
Example:
from slashpatch import Server, Context, command, Cog
app = Server('c293758d88bc26d54963f05676a8fa6c3404570169e350afd5c1f318bf52732a')
class Example(Cog):
@command(name="example")
async def example(self, ctx: Context):
print(ctx.raw)
return ctx.respond("Hello, world!", ephemeral=True)
@command(name="cases")
async def cases(self, ctx: Context):
return ctx.respond(embed={"description":"h"})
app.add_cog(Example())
Then run:
uvicorn main:app --host 0.0.0.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slashpatch-1.0.0.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for slashpatch-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34a2ada212606dbd28c78a5d1f3fa10b223dcda5cf4a504f9de623fbe14f194d |
|
MD5 | a522976cc32fc013ab0a63d0685cc0e6 |
|
BLAKE2b-256 | 0d865441ba1c2c70a90a8890622a258cab34886de6966037a444752495b91008 |