Documentation ¶
Index ¶
- Variables
- func Add(c *Command)
- func AnimeSubsTimer(_ *discordgo.Session, _ *discordgo.Ready)
- func AnimeSubsWebhookTimer(_ *discordgo.Session, _ *discordgo.Ready)
- func AnimeSubsWebhooksMapTimer(_ *discordgo.Session, _ *discordgo.Ready)
- func DailySchedule(s *discordgo.Session, guildID string)
- func DailyScheduleWebhook(s *discordgo.Session, guildID string)
- func DailyStatsTimer(_ *discordgo.Session, e *discordgo.Ready)
- func DonghuaCommandHandler(s *discordgo.Session, m *discordgo.Message)
- func HandleCommand(s *discordgo.Session, m *discordgo.MessageCreate)
- func IsValidSlashCommand(s *discordgo.Session, cmdTrigger, authorID, guildID string) bool
- func RaffleReactJoinHandler(s *discordgo.Session, r *discordgo.MessageReactionAdd)
- func RaffleReactLeaveHandler(s *discordgo.Session, r *discordgo.MessageReactionRemove)
- func ReactJoinHandler(s *discordgo.Session, r *discordgo.MessageReactionAdd)
- func ReactRemoveHandler(s *discordgo.Session, r *discordgo.MessageReactionRemove)
- func RegisterSlashCommands(_ *discordgo.Session, _ *discordgo.Ready)
- func ResetSubscriptions()
- func SaveReactJoin(messageID string, role string, emoji string, guildID string)
- func ScheduleTimer(_ *discordgo.Session, _ *discordgo.Ready)
- func UpdateAnimeSchedule()
- func VerifySlashCommand(s *discordgo.Session, cmdTrigger string, i *discordgo.InteractionCreate) error
- func WebhooksMapHandler()
- type Command
- type Joke
- type SafeTime
Constants ¶
This section is empty.
Variables ¶
var ( SlashCommands []*discordgo.ApplicationCommand SlashCommandsHandlers = make(map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate)) CommandMap = make(map[string]*Command) )
var DailyScheduleEventsBlock events.Block
var Today = &SafeTime{Time: time.Now()}
Functions ¶
func DailySchedule ¶
DailySchedule posts the schedule in a target channel if a guild has enabled it
func DailyScheduleWebhook ¶
TODO: DailyScheduleWebhook posts the schedule in a target channel if a guild has enabled it via webhook
func DonghuaCommandHandler ¶
DonghuaCommandHandler handles donghua disable or enable
func HandleCommand ¶
func HandleCommand(s *discordgo.Session, m *discordgo.MessageCreate)
HandleCommand handles the incoming message
func IsValidSlashCommand ¶
func RaffleReactJoinHandler ¶
func RaffleReactJoinHandler(s *discordgo.Session, r *discordgo.MessageReactionAdd)
RaffleReactJoinHandler enters a user in a raffle if they react
func RaffleReactLeaveHandler ¶
func RaffleReactLeaveHandler(s *discordgo.Session, r *discordgo.MessageReactionRemove)
RaffleReactLeaveHandler removes a user from a raffle if they unreact
func ReactJoinHandler ¶
func ReactJoinHandler(s *discordgo.Session, r *discordgo.MessageReactionAdd)
ReactJoinHandler gives a specific role to a user if they react
func ReactRemoveHandler ¶
func ReactRemoveHandler(s *discordgo.Session, r *discordgo.MessageReactionRemove)
ReactRemoveHandler removes a role from user if they unreact
func ResetSubscriptions ¶
func ResetSubscriptions()
ResetSubscriptions Resets anime sub notifications status
func SaveReactJoin ¶
SaveReactJoin saves the react channel join and parses if it already exists
func UpdateAnimeSchedule ¶
func UpdateAnimeSchedule()
UpdateAnimeSchedule fetches animeschedule.net timetable
func VerifySlashCommand ¶
func WebhooksMapHandler ¶
func WebhooksMapHandler()
WebhooksMapHandler updates the anime subs guilds' webhooks map
Types ¶
type Command ¶
type Command struct { Execute func(*discordgo.Session, *discordgo.Message) Name string Aliases []string Desc string DeleteAfter bool Permission functionality.Permission Module string DMAble bool Options []*discordgo.ApplicationCommandOption Handler func(s *discordgo.Session, i *discordgo.InteractionCreate) }