eb

package
v0.0.0-...-e4cf995 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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

func BuildEbEmbed(backup *ei.Backup, farmChoice string, userID string) dc.Embed

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

func GetSlashEbCommand(cmd string) *dc.Command

GetSlashEbCommand returns the slash command definition for /eb.

func HandleEb

func HandleEb(e *dc.CommandEvent)

HandleEb handles the /eb command.

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

func NormalizeFarmChoice(choice string) string

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.

Jump to

Keyboard shortcuts

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