Documentation
¶
Index ¶
- Constants
- func DeleteAltID(guildID string, altID string) error
- func GetIDs(altIDs []*AltID) []string
- func IsAltID(guildID string, altID string) bool
- func Start()
- type AltID
- type Plugin
- func (plugin *Plugin) GetAdminHelp() []string
- func (plugin *Plugin) GetCommandHandlers() map[string]func(*discordgo.Session, *discordgo.InteractionCreate)
- func (plugin *Plugin) GetCommands() []*discordgo.ApplicationCommand
- func (plugin *Plugin) GetComponentHandlers() map[string]func(*discordgo.Session, *discordgo.InteractionCreate)
- func (plugin *Plugin) GetHelp() []string
- func (plugin *Plugin) GetName() string
- func (plugin *Plugin) Initialize(b *discord.Bot, d *mongo.MongoDB)
- func (plugin *Plugin) Status() discord.PluginStatus
- func (plugin *Plugin) Stop()
Constants ¶
const (
AltCollection = "alt_ids"
)
const (
PluginName = "alt"
)
Variables ¶
This section is empty.
Functions ¶
func DeleteAltID ¶
DeleteAltID removes an alt ID from the database.
Types ¶
type AltID ¶
type AltID struct {
ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
GuildID string `json:"guild_id" bson:"guild_id"`
OwnerID string `json:"owner_id" bson:"owner_id"`
AltID string `json:"alt_id" bson:"alt_id"`
}
AltID represents an alternate ID associated with a guild member.
func GetAllAltIDs ¶
GetAllAltIDs retrieves all alt IDs for a given owner in a guild from the database. If ownerID is an empty string, it retrieves all alt IDs for the guild.
type Plugin ¶
type Plugin struct{}
Plugin is the plugin for the server
func (*Plugin) GetAdminHelp ¶
GetAdminHelp returns the admin help for the banking system
func (*Plugin) GetCommandHandlers ¶
func (plugin *Plugin) GetCommandHandlers() map[string]func(*discordgo.Session, *discordgo.InteractionCreate)
GetCommandHandlers returns the command handlers for the banking system
func (*Plugin) GetCommands ¶
func (plugin *Plugin) GetCommands() []*discordgo.ApplicationCommand
GetCommands returns the commands for the banking system
func (*Plugin) GetComponentHandlers ¶
func (plugin *Plugin) GetComponentHandlers() map[string]func(*discordgo.Session, *discordgo.InteractionCreate)
GetComponentHandlers returns the component handlers for the banking system
func (*Plugin) Initialize ¶
Initialize saves the Discord bot to be used by the banking system
func (*Plugin) Status ¶
func (plugin *Plugin) Status() discord.PluginStatus
Status returns the status of the heist game. This is used to determine if the plugin is running or not.