Skip to content

Lightweight and easy to use Router (Opine) for Discord Slash Commands.

License

Notifications You must be signed in to change notification settings

DjDeveloperr/slash-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

  • 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.

Contributing

You're always welcome to contribute! Please don't forget to check Contributing guide!

License

Read more at LICENSE.

Copyright 2020 @ DjDeveloperr

About

Lightweight and easy to use Router (Opine) for Discord Slash Commands.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published