Compare commits
6 Commits
v0.4.1
...
bfe9601cd3
Author | SHA1 | Date | |
---|---|---|---|
bfe9601cd3
|
|||
c6d877b101
|
|||
3bf763f196
|
|||
8f9205fbf0
|
|||
e1bae3edea
|
|||
34fdf453c1
|
@@ -58,7 +58,10 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
//bolt defaults the command indicator to '.' however that can be changed with the options
|
//bolt defaults the command indicator to '.' however that can be changed with the options
|
||||||
//Example: bolt.New(bolt.WithIndicator('!')) would support commands like !ping
|
//Example: bolt.New(bolt.WithIndicator('!')) would support commands like !ping
|
||||||
b := bolt.New(bolt.WithLogLevel(bolt.LogLevelCmd))
|
b, err := bolt.New(bolt.WithLogLevel(bolt.LogLevelCmd))
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
b.AddCommands(
|
b.AddCommands(
|
||||||
// basic ping pong command, .ping can be run at anytime by anyone and will reply "pong"
|
// basic ping pong command, .ping can be run at anytime by anyone and will reply "pong"
|
||||||
@@ -95,11 +98,12 @@ func main() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
//start is a blocking call that handles safe-shutdown, all configuration and setup should be done before calling Start()
|
//start is a blocking call that handles safe-shutdown, all configuration and setup should be done before calling Start()
|
||||||
err := b.Start()
|
err = b.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
3
bolt.go
3
bolt.go
@@ -20,7 +20,8 @@ const (
|
|||||||
dg.IntentGuildMembers |
|
dg.IntentGuildMembers |
|
||||||
dg.IntentGuildPresences |
|
dg.IntentGuildPresences |
|
||||||
dg.IntentMessageContent |
|
dg.IntentMessageContent |
|
||||||
dg.IntentsGuildMessages
|
dg.IntentsGuildMessages |
|
||||||
|
dg.IntentGuildMessageReactions
|
||||||
)
|
)
|
||||||
|
|
||||||
// basic bot structure containing discordgo connection as well as the command map
|
// basic bot structure containing discordgo connection as well as the command map
|
||||||
|
39
message.go
39
message.go
@@ -5,15 +5,38 @@ import "fmt"
|
|||||||
//built-in Discord reactions
|
//built-in Discord reactions
|
||||||
type Reaction string
|
type Reaction string
|
||||||
|
|
||||||
|
//a few easy-to-use emojis, Discordgo/Discord API requires them to be saved like this.
|
||||||
const (
|
const (
|
||||||
ReactionThumbsUp Reaction = ":+1:"
|
ReactionThumbsUp Reaction = "👍"
|
||||||
ReactionThumbsDown Reaction = ":-1:"
|
ReactionThumbsDown Reaction = "👎"
|
||||||
ReactionPointUp Reaction = ":point_up:"
|
ReactionHundred Reaction = "💯"
|
||||||
ReactionPointDown Reaction = ":point_down:"
|
ReactionHeart Reaction = "❤️"
|
||||||
ReactionHotdog Reaction = ":hotdog:"
|
ReactionPinkHeart Reaction = "🩷"
|
||||||
ReactionGiraffe Reaction = ":giraffe:"
|
ReactionOrangeHeart Reaction = "🧡"
|
||||||
ReactionWatermelon Reaction = ":watermelon:"
|
ReactionYellowHeart Reaction = "💛"
|
||||||
ReactionNoPedestrians Reaction = ":no_pedestrian:"
|
ReactionGreenHeart Reaction = "💚"
|
||||||
|
ReactionBlueHeart Reaction = "💙"
|
||||||
|
ReactionBlackHeart Reaction = "🖤"
|
||||||
|
ReactionPointUp Reaction = "☝️"
|
||||||
|
ReactionPointDown Reaction = "👇"
|
||||||
|
ReactionHotdog Reaction = "🌭"
|
||||||
|
ReactionDog Reaction = "🐶"
|
||||||
|
ReactionCat Reaction = "🐱"
|
||||||
|
ReactionMonkey Reaction = "🐒"
|
||||||
|
ReactionGiraffe Reaction = "🦒"
|
||||||
|
ReactionDuck Reaction = "🦆"
|
||||||
|
ReactionGoose Reaction = "🪿"
|
||||||
|
ReactionWatermelon Reaction = "🍉"
|
||||||
|
ReactionHoney Reaction = "🍯"
|
||||||
|
ReactionSandwich Reaction = "🥪"
|
||||||
|
ReactionPepper Reaction = "🌶️"
|
||||||
|
ReactionNoPedestrians Reaction = "🚷"
|
||||||
|
ReactionExclamation Reaction = "❗"
|
||||||
|
ReactionDoubleExclamation Reaction = "‼️"
|
||||||
|
ReactionSkull Reaction = "💀"
|
||||||
|
ReactionSpeakingHead Reaction = "🗣️"
|
||||||
|
ReactionGreenCheck Reaction = "✅"
|
||||||
|
ReactionDragon Reaction = "🐉"
|
||||||
)
|
)
|
||||||
|
|
||||||
// information about attachments to messages
|
// information about attachments to messages
|
||||||
|
Reference in New Issue
Block a user