TerraOceanPlugin/GoBot/discord/modules/commands.go

45 lines
752 B
Go

2019-10-12 09:45:43 +07:00
package modules
import "github.com/bwmarrin/discordgo"
2019-10-12 11:29:33 +07:00
type CommandHandler func(s *discordgo.Session, m *discordgo.MessageCreate, commands []string)
2019-10-12 09:45:43 +07:00
type Command struct {
Name string
2019-10-12 11:29:33 +07:00
Handler CommandHandler
2019-10-12 09:45:43 +07:00
}
var Commands = []Command{
Command{
Name: "!sendas",
Handler: sendAs,
},
Command{
Name: "!editas",
Handler: editAs,
},
Command{
Name: "!peektrust",
Handler: viewTrustLevel,
},
Command{
Name: "!invite",
Handler: createInvite,
},
Command{
Name: "!validate",
Handler: checkUseInvite,
},
Command{
Name: "!trust",
Handler: changeTrust,
},
2019-10-13 09:59:35 +07:00
Command{
Name: "!setmcusername",
Handler: updateMinecraftUsername,
},
Command{
Name: "!votesuggest",
Handler: voteSuggestion,
},
2019-10-12 09:45:43 +07:00
}