82 lines
1.5 KiB
Go
82 lines
1.5 KiB
Go
package modules
|
|
|
|
import (
|
|
"TerraOceanBot/discord/config"
|
|
|
|
"github.com/bwmarrin/discordgo"
|
|
)
|
|
|
|
type CommandHandler func(s *discordgo.Session, m *discordgo.MessageCreate, commands []string)
|
|
type Command struct {
|
|
Name string
|
|
Handler CommandHandler
|
|
Description string
|
|
Usage string
|
|
Admin bool
|
|
}
|
|
|
|
var Commands = []Command{
|
|
//Admin Commands
|
|
Command{
|
|
Name: "!batchrole",
|
|
Handler: batchGiveRole,
|
|
Usage: config.BatchRoleUsage,
|
|
Admin: true,
|
|
},
|
|
Command{
|
|
Name: "!editas",
|
|
Handler: editAs,
|
|
Usage: config.EditAsUsage,
|
|
Admin: true,
|
|
},
|
|
Command{
|
|
Name: "!peektrust",
|
|
Handler: viewTrustLevel,
|
|
Usage: config.VTLUsage,
|
|
Admin: true,
|
|
},
|
|
Command{
|
|
Name: "!sendas",
|
|
Handler: sendAs,
|
|
Usage: config.SendAsUsage,
|
|
Admin: true,
|
|
},
|
|
//Regular Commands
|
|
Command{
|
|
Name: "!help",
|
|
Handler: showHelp,
|
|
Usage: "!help",
|
|
Admin: false,
|
|
},
|
|
Command{
|
|
Name: "!invite",
|
|
Handler: createInvite,
|
|
Usage: config.InviteUsage,
|
|
Admin: false,
|
|
},
|
|
Command{
|
|
Name: "!setmcusername",
|
|
Handler: updateMinecraftUsername,
|
|
Usage: config.SetMCUsernameUsage,
|
|
Admin: false,
|
|
},
|
|
Command{
|
|
Name: "!trust",
|
|
Handler: changeTrust,
|
|
Usage: config.ChangeTrustUsage,
|
|
Admin: false,
|
|
},
|
|
Command{
|
|
Name: "!validate",
|
|
Handler: checkUseInvite,
|
|
Usage: config.ValidateUsage,
|
|
Admin: false,
|
|
},
|
|
Command{
|
|
Name: "!votesuggest",
|
|
Handler: voteSuggestion,
|
|
Usage: config.VoteSuggestionUsage,
|
|
Admin: false,
|
|
},
|
|
}
|