command

package
v0.0.0-...-a667c3f Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(err error) *discordgo.InteractionResponseData

ErrorResponse returns discordgo.InteractionResponseData with the error message as content.

func MemberChannel

func MemberChannel(s *discordgo.Session, guildID, memberID string) string

MemberChannel returns the id of the current channel the user is in or and empty string if the user is not in a channel.

func Option

Option searches the given options by its name and returns it.

Types

type Command

type Command struct {
	discordgo.ApplicationCommand

	// Autocomplete is the Handler to be called when the user requests auto-completion.
	Autocomplete Handler

	// Command is the Handler to be called when the command is run.
	Command Handler
}

Command represents a (application) slash-command.

type Handler

Handler is a function that handles a discordgo.InteractionCreate event.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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