goMuffin/handler/messageCreate.go

16 lines
276 B
Go
Raw Normal View History

2024-08-01 11:37:18 +00:00
package handler
import (
"github.com/bwmarrin/discordgo"
)
func MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
if m.Author.ID == s.State.User.ID && m.Author.Bot {
return
}
if m.Content == "!ping" {
s.ChannelMessageSend(m.ChannelID, "Pong!")
}
}