Documentation ¶
Index ¶
- Variables
- func SetLogLevel(l string)
- type Audio
- type Bot
- func (b *Bot) BotReadyHandler(s *discordgo.Session, ev *discordgo.Ready)
- func (b *Bot) CheckRatCookies()
- func (b *Bot) CollectSummaryData(userId ...string) error
- func (b *Bot) CommandHandler(s *discordgo.Session, m *discordgo.MessageCreate)
- func (b *Bot) GetEncryptionKey() error
- func (b *Bot) ResetSlashCmds()
- func (b *Bot) Run()
- func (b *Bot) SlashCmdHandler(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (b *Bot) SlashCmdList() []*discordgo.ApplicationCommand
- func (b *Bot) UserPlaysSot(s *discordgo.Session, m *discordgo.PresenceUpdate)
Constants ¶
This section is empty.
Variables ¶
View Source
var GuildID string = ""
Functions ¶
func SetLogLevel ¶
func SetLogLevel(l string)
Types ¶
type Bot ¶
type Bot struct { AuthToken string Config *viper.Viper Audio map[string]Audio AudioMutex *sync.Mutex HttpClient *http.Client Db *gorm.DB Session *discordgo.Session AnnounceChan *discordgo.Channel TMDb *tmdb.TMDb OwmClient *owm.Client StartTime time.Time }
func (*Bot) BotReadyHandler ¶
func (*Bot) CheckRatCookies ¶ added in v1.4.7
func (b *Bot) CheckRatCookies()
func (*Bot) CollectSummaryData ¶ added in v1.4.7
func (*Bot) CommandHandler ¶ added in v1.4.0
func (b *Bot) CommandHandler(s *discordgo.Session, m *discordgo.MessageCreate)
Let's the bot tell you the current date/time when requested via !time command
func (*Bot) GetEncryptionKey ¶ added in v1.4.4
func (*Bot) ResetSlashCmds ¶ added in v1.4.6
func (b *Bot) ResetSlashCmds()
func (*Bot) SlashCmdHandler ¶ added in v1.4.6
func (b *Bot) SlashCmdHandler(s *discordgo.Session, i *discordgo.InteractionCreate)
SlashCmdHandler handles all incoming slash commands. It creates a general user object and forward the command data to the corresponding handler submethod
func (*Bot) SlashCmdList ¶ added in v1.4.6
func (b *Bot) SlashCmdList() []*discordgo.ApplicationCommand
List of slash commands and descriptions
func (*Bot) UserPlaysSot ¶
func (b *Bot) UserPlaysSot(s *discordgo.Session, m *discordgo.PresenceUpdate)
UserPlaysSot monitors the presence updates of the guild users. If a user starts playing SoT, it will fetch the current balance from the SoT API and store it in the database. Once the user finished their game, it will redo the same action and present a difference to the announce channel
Click to show internal directories.
Click to hide internal directories.