Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConfigKeyDiscordAPIToken configKey = "discordapitoken" ConfigKeyGiveawayChannelID configKey = "giveawaychannelid" ConfigKeyGiveawayGuildlID configKey = "giveawayguildid" ConfigKeyGiveawayOrganiserID configKey = "giveawayorganiserid" ConfigKeyGiveawayRoleID configKey = "giveawayroleid" )
Variables ¶
View Source
var Config = map[configKey]string{}
Functions ¶
func GetPastWinnerIDs ¶
func LoadConfig ¶
func LoadConfig() (err error)
Types ¶
type ConfigItem ¶
type Event ¶
type Event struct { CreatorID string ID string Name string ScheduledEndTime time.Time ScheduledStartTime time.Time Status discordgo.GuildScheduledEventStatus TriggersRaffle bool }
func GetEventByID ¶
func NewEventFromDiscordEvent ¶
func NewEventFromDiscordEvent(dcEvent *discordgo.GuildScheduledEvent) (event *Event)
type Participant ¶
func NewParticipantFromDiscordUser ¶
func NewParticipantFromDiscordUser(dcUser *discordgo.User) (participant *Participant)
func (*Participant) Upsert ¶
func (participant *Participant) Upsert() (err error)
type Prize ¶
func GetAvailablePrizes ¶
func (*Prize) AssignEvent ¶
func (*Prize) AssignWinner ¶
Click to show internal directories.
Click to hide internal directories.