Files
bolt/command.go

22 lines
641 B
Go
Raw Permalink Normal View History

2025-06-04 16:00:53 -04:00
package bolt
import (
"time"
)
2025-06-04 16:00:53 -04:00
// Command represents a bolt command in its entirety
2025-06-04 16:00:53 -04:00
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
2025-06-04 16:00:53 -04:00
}