Documentation
¶
Index ¶
- Constants
- func BuildEbComponents(backup *ei.Backup, farmChoice string, userID string, avatarURL string) []dc.LayoutComponent
- func BuildEbEmbed(backup *ei.Backup, farmChoice string, userID string) dc.Embed
- func ExecuteEb(e dc.InteractionEvent, farmChoice string, eggIncID string, showAvatar bool, ...)
- func ExecuteEbTarget(e dc.InteractionEvent, farmChoice string, eggIncID string, showAvatar bool, ...)
- func GetSlashEbCommand(cmd string) *dc.Command
- func HandleEb(e *dc.CommandEvent)
- func HandleEbAutocomplete(e *dc.AutocompleteEvent)
- func HandleEbModal(e *dc.ModalEvent, options dc.OptionValues, encryptedID string, okayToSave bool)
- func NormalizeFarmChoice(choice string) string
- type AltAccount
Constants ¶
const ( FarmHome = "Home" FarmVirtue = "Virtue" FarmHomeAndVirtue = "Home & Virtue" DefaultFarmChoice = FarmHomeAndVirtue StickySettingEbFarm = "eb-farm" StickySettingEbShowAvatar = "eb-show-avatar" )
Variables ¶
This section is empty.
Functions ¶
func BuildEbComponents ¶
func BuildEbComponents(backup *ei.Backup, farmChoice string, userID string, avatarURL string) []dc.LayoutComponent
BuildEbComponents computes the earnings bonus values and generates the Components V2 container.
func BuildEbEmbed ¶
BuildEbEmbed computes the earnings bonus values and generates the Discord embed.
func ExecuteEb ¶
func ExecuteEb(e dc.InteractionEvent, farmChoice string, eggIncID string, showAvatar bool, okayToSave bool)
ExecuteEb executes the EB display logic and responds to the interaction event.
func ExecuteEbTarget ¶
func ExecuteEbTarget(e dc.InteractionEvent, farmChoice string, eggIncID string, showAvatar bool, okayToSave bool, targetUserID string, notice string)
ExecuteEbTarget executes the EB display logic for a specific target user ID with optional notice.
func GetSlashEbCommand ¶
GetSlashEbCommand returns the slash command definition for /eb.
func HandleEbAutocomplete ¶
func HandleEbAutocomplete(e *dc.AutocompleteEvent)
HandleEbAutocomplete handles autocomplete events for the /eb command.
func HandleEbModal ¶
func HandleEbModal(e *dc.ModalEvent, options dc.OptionValues, encryptedID string, okayToSave bool)
HandleEbModal handles the modal submission when a user provides their Egg Inc ID.
func NormalizeFarmChoice ¶
NormalizeFarmChoice cleans and standardizes a user-supplied farm choice.
Types ¶
type AltAccount ¶
type AltAccount = farmerstate.AltAccount
AltAccount represents an alternate account with a saved Egg Inc ID.
func GetUserAltsWithSavedEID ¶
func GetUserAltsWithSavedEID(userID string) []AltAccount
GetUserAltsWithSavedEID returns all registered alternate accounts for userID that have a saved Egg Inc ID.