discord

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 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) RegisterInteractionCreateHandlers

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

type MessageReplier

type MessageReplier func(msg string) error

type VerificationDialog added in v0.3.0

type VerificationDialog struct {
	UserDisplay string
	SID         string
	EID         string
	EventName   string
	IGN         string
	Score       string
	Verified    bool
	VerifiedBy  string
	URL         string
}

func FromEmbed added in v0.3.0

func FromEmbed(embeds []*discordgo.MessageEmbed) (*VerificationDialog, error)

func (*VerificationDialog) ToEmbed added in v0.3.0

Jump to

Keyboard shortcuts

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