Documentation ¶
Index ¶
- type DiscordInteraction
- type DiscordInteractionWrapper
- func (w *DiscordInteractionWrapper) GetHandlerForCommand(command string) func(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (w *DiscordInteractionWrapper) GetHandlerForComponent(component string) func(s *discordgo.Session, i *discordgo.InteractionCreate)
- func (c *DiscordInteractionWrapper) HandleTip(s *discordgo.Session, m *discordgo.MessageCreate)
- func (c *DiscordInteractionWrapper) HandleUpscaleGeneration(s *discordgo.Session, i *discordgo.InteractionCreate, outputId uuid.UUID, ...)
- func (c *DiscordInteractionWrapper) NewAuthenticateCommand() *DiscordInteraction
- func (c *DiscordInteractionWrapper) NewHelpCommand() *DiscordInteraction
- func (c *DiscordInteractionWrapper) NewImageCommand() *DiscordInteraction
- func (c *DiscordInteractionWrapper) NewInfoCommand() *DiscordInteraction
- func (c *DiscordInteractionWrapper) NewUpscaleCommand() *DiscordInteraction
- func (c *DiscordInteractionWrapper) NewVoiceoverCommand() *DiscordInteraction
- type LoginInteraction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscordInteraction ¶
type DiscordInteraction struct { ApplicationCommand *discordgo.ApplicationCommand ComponentID string Handler func(s *discordgo.Session, i *discordgo.InteractionCreate) }
Specification for specific interactions
type DiscordInteractionWrapper ¶
type DiscordInteractionWrapper struct { Disco *domain.DiscoDomain SupabseAuth *database.SupabaseAuth LoginInteractionMap *shared.SyncMap[*LoginInteraction] Commands []*DiscordInteraction Components []*DiscordInteraction SCWorker *scworker.SCWorker Repo *repository.Repository Clip *clip.ClipService }
Wrapper for all interactions
func NewDiscordInteractionWrapper ¶
func NewDiscordInteractionWrapper( repo *repository.Repository, redis *database.RedisWrapper, supabase *database.SupabaseAuth, sMap *shared.SyncMap[chan requests.CogWebhookMessage], qThrottler *shared.UserQueueThrottlerMap, safetyChecker *utils.TranslatorSafetyChecker, track *analytics.AnalyticsService, LoginInteractionMap *shared.SyncMap[*LoginInteraction], MQClient queue.MQClient, ) *DiscordInteractionWrapper
Create new wrapper and register interactions
func (*DiscordInteractionWrapper) GetHandlerForCommand ¶
func (w *DiscordInteractionWrapper) GetHandlerForCommand(command string) func(s *discordgo.Session, i *discordgo.InteractionCreate)
func (*DiscordInteractionWrapper) GetHandlerForComponent ¶
func (w *DiscordInteractionWrapper) GetHandlerForComponent(component string) func(s *discordgo.Session, i *discordgo.InteractionCreate)
func (*DiscordInteractionWrapper) HandleTip ¶
func (c *DiscordInteractionWrapper) HandleTip(s *discordgo.Session, m *discordgo.MessageCreate)
func (*DiscordInteractionWrapper) HandleUpscaleGeneration ¶
func (c *DiscordInteractionWrapper) HandleUpscaleGeneration(s *discordgo.Session, i *discordgo.InteractionCreate, outputId uuid.UUID, number int)
Handle upscaling
func (*DiscordInteractionWrapper) NewAuthenticateCommand ¶
func (c *DiscordInteractionWrapper) NewAuthenticateCommand() *DiscordInteraction
func (*DiscordInteractionWrapper) NewHelpCommand ¶
func (c *DiscordInteractionWrapper) NewHelpCommand() *DiscordInteraction
func (*DiscordInteractionWrapper) NewImageCommand ¶
func (c *DiscordInteractionWrapper) NewImageCommand() *DiscordInteraction
func (*DiscordInteractionWrapper) NewInfoCommand ¶
func (c *DiscordInteractionWrapper) NewInfoCommand() *DiscordInteraction
func (*DiscordInteractionWrapper) NewUpscaleCommand ¶
func (c *DiscordInteractionWrapper) NewUpscaleCommand() *DiscordInteraction
func (*DiscordInteractionWrapper) NewVoiceoverCommand ¶
func (c *DiscordInteractionWrapper) NewVoiceoverCommand() *DiscordInteraction
type LoginInteraction ¶
Click to show internal directories.
Click to hide internal directories.