Improved error handling for the discord bot
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/akyoto/color"
|
||||
"github.com/bwmarrin/discordgo"
|
||||
)
|
||||
|
||||
@ -10,6 +11,11 @@ func Source(s *discordgo.Session, msg *discordgo.MessageCreate) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
s.ChannelMessageSend(msg.ChannelID, msg.Author.Mention()+" B-baaaaaaaka! Y..you...you want to...TOUCH MY CODE?!\n\nhttps://github.com/animenotifier/notify.moe/tree/go/bots/discord")
|
||||
_, err := s.ChannelMessageSend(msg.ChannelID, msg.Author.Mention()+" B-baaaaaaaka! Y..you...you want to...TOUCH MY CODE?!\n\nhttps://github.com/animenotifier/notify.moe/tree/go/bots/discord")
|
||||
|
||||
if err != nil {
|
||||
color.Red(err.Error())
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user