- removing old or commented code - removing unused or deprecated types - commenting everything, probably too much - split msgEventHandler logic into methods - readme update, removed most docs the pkg site looks good - adjusted intents option, no need for a type
22 lines
641 B
Go
22 lines
641 B
Go
package bolt
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Command represents a bolt command in its entirety
|
|
type Command struct {
|
|
//the trigger phrase for the command, this field cannot include the command indicator. If the command is .ping
|
|
//Trigger should be "ping"
|
|
Trigger string
|
|
//handler function to run when command is detected
|
|
Payload Payload
|
|
//the amount of time that must pass before a command can be run again
|
|
Timeout time.Duration
|
|
//timestamp of last command run
|
|
lastRun time.Time
|
|
//the roles that are allowed to execute this command, the command author must have at least one of these roles
|
|
//in order to use the command
|
|
Roles []string
|
|
}
|