added newsendpepe

This commit is contained in:
DutchEllie 2021-06-03 12:54:03 +02:00
parent 0829c2a39d
commit e56686ee3c
2 changed files with 5 additions and 0 deletions

View File

@ -5,3 +5,7 @@ import "github.com/bwmarrin/discordgo"
func newCringe(s *discordgo.Session, m *discordgo.MessageCreate) { func newCringe(s *discordgo.Session, m *discordgo.MessageCreate) {
s.ChannelMessageSend(m.ChannelID, "this is a test message right from the new command system!") s.ChannelMessageSend(m.ChannelID, "this is a test message right from the new command system!")
} }
func newSendPepe(s *discordgo.Session, m *discordgo.MessageCreate) {
s.ChannelMessageSend(m.ChannelID, "cmd not yet working, but this needed to be registered otherwise the code would break")
}

View File

@ -65,6 +65,7 @@ func main() {
mux := NewCommandMux() mux := NewCommandMux()
mux.prefix = "!newpepe" mux.prefix = "!newpepe"
mux.HandleFunc("newcringe", newCringe) mux.HandleFunc("newcringe", newCringe)
mux.HandleFunc(mux.prefix, newSendPepe)
app := &application{ app := &application{
infoLog: infoLog, infoLog: infoLog,