handler

package
v0.0.0-...-bc7309e Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: AGPL-3.0-or-later Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

type EventHandler struct {
	// contains filtered or unexported fields
}

EventHandler handles discord events and puts them into rabbitMQ

func NewEventHandler

func NewEventHandler(
	logger *zap.Logger,
	redisClient *redis.Client,
	publisher *events.Publisher,
	checker *whitelist.Checker,
	state *state.State,
	deduplicate bool,
	requestGuildMembersDelay time.Duration,
) *EventHandler

NewEventHandler creates a new EventHandler

func (*EventHandler) IsDuplicate

func (eh *EventHandler) IsDuplicate(key string, expiration time.Duration) (bool, error)

func (*EventHandler) OnDiscordEvent

func (eh *EventHandler) OnDiscordEvent(session *discordgo.Session, eventItem interface{})

OnDiscordEvent receives discord events

Jump to

Keyboard shortcuts

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