discord

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithChannelID

func WithChannelID(cid string) zap.Field

func WithCommand

func WithCommand(c string) zap.Field

func WithComponent

func WithComponent(co string) zap.Field

func WithEventID

func WithEventID(eid string) zap.Field

func WithGuildID

func WithGuildID(gid string) zap.Field

func WithHandler

func WithHandler(h string) zap.Field

func WithMessageID

func WithMessageID(mid string) zap.Field

func WithRoleID

func WithRoleID(rid string) zap.Field

func WithSubmissionID

func WithSubmissionID(sid string) zap.Field

func WithUserID

func WithUserID(uid string) zap.Field

Types

type EventHandler

type EventHandler struct {
	Cache                     cache.Cache
	Logger                    *zap.Logger
	Prefix                    string
	EventScoreService         scores.ScoresService
	MetadataService           meta.Service
	InteractionCreateHandlers map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate)
	Commands                  []*discordgo.ApplicationCommand
}

func (*EventHandler) HandleInteractionsCreate

func (h *EventHandler) HandleInteractionsCreate(s *discordgo.Session, i *discordgo.InteractionCreate)

func (*EventHandler) HandleMessageCreate

func (h *EventHandler) HandleMessageCreate(s *discordgo.Session, m *discordgo.MessageCreate)

func (*EventHandler) HandleMessageReactionAdd

func (h *EventHandler) HandleMessageReactionAdd(s *discordgo.Session, r *discordgo.MessageReactionAdd)

func (*EventHandler) RegisterInteractionCreateHandlers

func (h *EventHandler) RegisterInteractionCreateHandlers(s *discordgo.Session) error

type MessageReplier

type MessageReplier func(msg string) error

Jump to

Keyboard shortcuts

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