https://github.com/djdeveloperr/slash-router
Lightweight and easy to use Router (Opine) for Discord Slash Commands.
https://github.com/djdeveloperr/slash-router
api deno discord opine slash-commands
Last synced: 3 months ago
JSON representation
Lightweight and easy to use Router (Opine) for Discord Slash Commands.
- Host: GitHub
- URL: https://github.com/djdeveloperr/slash-router
- Owner: DjDeveloperr
- License: mit
- Created: 2020-12-14T11:59:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-18T11:54:09.000Z (over 4 years ago)
- Last Synced: 2025-02-10T11:33:41.054Z (5 months ago)
- Topics: api, deno, discord, opine, slash-commands
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Slash-Router
Slash Router is a lightweight framework for handling Discord Interactions over HTTP POSTs, providing with a easy to use Router that can be plug into [Opine](https://deno.land/x/opine).
- Easily pluggable to Opine App
- Utility function to verify Interaction
- Types for Interactions/Slash Commands API## Getting started
### Verification
Request Verification is handled by the Router automatically, but if you're making a custom implementation using some other framework, try out `verify` method exported from `mod.ts`!
- `async verify(rawBody: Buffer | Uint8Array | string, signature: string, timestamp: string, clientPublicKey: string`
- rawBody: Raw payload sent by Discord in Request
- signature: Signature present in headers of Request (`X-Signature-Ed25519`)
- timestamp: Timestamp present in headers of Request (`X-Signature-Timestamp`)
- clientPublicKey: Your Client's Public Key (present on Dev Portal)### Examples
Check examples in [this directory](./test).
## Contributing
You're always welcome to contribute! Please don't forget to check [Contributing guide!](CONTRIBUTING.md)
## License
Read more at [LICENSE](LICENSE).
Copyright 2020 @ DjDeveloperr