adding reaction support (#2)

- some rework of structure to allow for more puposeful response usage
- react and response now live on the message itself
- message structs split into own file
- readme updated to use new methods

Reviewed-on: #2
Co-authored-by: jake <jake.young.dev@gmail.com>
Co-committed-by: jake <jake.young.dev@gmail.com>
This commit is contained in:
2025-07-09 20:11:12 +00:00
committed by jake
parent 113fcbf2d1
commit 90a17ded2b
4 changed files with 144 additions and 52 deletions

View File

@@ -1,6 +1,8 @@
package bolt
import "time"
import (
"time"
)
// custom Discord commands
type Command struct {
@@ -12,14 +14,4 @@ type Command struct {
}
// command payload functions, any strings returned are sent as a response to the command
type Payload func(msg Message) (string, error)
// message information passed to payload function
type Message struct {
Author string //username of message author
ID string //discord ID of message author
Words []string //words from message split on whitespace
Content string //entire message content
Channel string //message channel
Server string //message guild
}
type Payload func(msg Message) error