account

package
v0.0.0-...-fd03e07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AltCollection = "alt_ids"
)
View Source
const (
	PluginName = "alt"
)

Variables

This section is empty.

Functions

func DeleteAltID

func DeleteAltID(guildID string, altID string) error

DeleteAltID removes an alt ID from the database.

func GetIDs

func GetIDs(altIDs []*AltID) []string

GetIDs returns a slice of alt ID strings from a slice of AltID structs.

func IsAltID

func IsAltID(guildID string, altID string) bool

IsAltID checks if the given alt ID exists in the database for the specified guild.

func Start

func Start()

Start creates and registers the plugin for the server

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

func GetAllAltIDs(guildID string, ownerID string) []*AltID

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.

func GetAltID

func GetAltID(guildID string, ownerID string, altID string) *AltID

GetAltID retrieves an existing alt ID from the database, or creates a new one if it does not exist.

type Plugin

type Plugin struct{}

Plugin is the plugin for the server

func (*Plugin) GetAdminHelp

func (plugin *Plugin) GetAdminHelp() []string

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) GetHelp

func (plugin *Plugin) GetHelp() []string

GetHelp returns the member help for the banking system

func (*Plugin) GetName

func (plugin *Plugin) GetName() string

GetName returns the name of the banking system plugin

func (*Plugin) Initialize

func (plugin *Plugin) Initialize(b *discord.Bot, d *mongo.MongoDB)

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.

func (*Plugin) Stop

func (plugin *Plugin) Stop()

Stop stops the heist game. This is called when the bot is shutting down.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL