Skip to content

A route-based Discord command router with support for arguments and signatures

License

Notifications You must be signed in to change notification settings

tystuyfzand/astral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Astral

A command router for discordgo with a few twists.

Heavily inspired by dgrouter, but based off the command system used in Astra.

Importing/Installing

go get meow.tf/astral
import "meow.tf/astral/router"

Signatures

Astral supports signatures, which are a command and arguments defined in a single string.

Example:

command <something> <#channel> [optional]

This defines a command command, with required argument something, channel argument channel, and optional optional.

Middleware

Each route can have middleware assigned to back out/stop execution of a command. This is useful for injecting parameters, checking conditions (Permissions, NSFW), etc.

See the "middleware" folder for examples.

Examples

A basic example showing the usage and middleware is available under examples/basic

About

A route-based Discord command router with support for arguments and signatures

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages