middware

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Next command.Command
}

Slash command handler logger

func NewLogger

func NewLogger(next command.Command) Logger

NewLogger creates a new logger middware.

logger: logger to use.

next: next middware in chain.

func (Logger) EditIteractionResponse deprecated added in v1.3.0

func (l Logger) EditIteractionResponse(sess *discordgo.Session, i *discordgo.InteractionCreate) (string, error)

handler calls discord slash command handler with logging

Deprecated: use `HandleInteractionApplicationCommand()` instead

func (Logger) HandleInteractionApplicationCommand added in v1.5.0

func (l Logger) HandleInteractionApplicationCommand(sess *discordgo.Session, i *discordgo.InteractionCreate) (string, error)

func (Logger) HandlerFunc deprecated added in v1.3.0

func (l Logger) HandlerFunc(sess *discordgo.Session, i *discordgo.InteractionCreate) (string, error)

handler calls discord slash command handler with logging

Deprecated: use `HandleInteractionApplicationCommand()` instead

func (Logger) InteractionApplicationCommandAutocomplete added in v1.3.0

func (l Logger) InteractionApplicationCommandAutocomplete(sess *discordgo.Session, i *discordgo.InteractionCreate) (string, error)

handler calls discord slash command handler with logging

Jump to

Keyboard shortcuts

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