command

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KumaInfo = Executor{Data: data, Execute: execute}

KumaInfo framework info command

Functions

This section is empty.

Types

type Event added in v2.1.0

type Event struct {
	Session     *discordgo.Session
	Ev          *discordgo.InteractionCreate
	Member      *discordgo.Member
	User        *discordgo.User
	Interaction *discordgo.Interaction
}

func (*Event) Reply added in v2.1.0

func (ev *Event) Reply(content string) error

Reply send string message to the command

func (*Event) ReplyEmbed added in v2.1.0

func (ev *Event) ReplyEmbed(embed *utils.Embed, ephemeral bool) error

ReplyEmbed send embed message to the command

func (*Event) ReplyEmbedEphemeral added in v2.1.0

func (ev *Event) ReplyEmbedEphemeral(embed *utils.Embed) error

ReplyEmbedEphemeral send embed message to the command with ephemeral

func (*Event) ReplyEmbeds added in v2.1.0

func (ev *Event) ReplyEmbeds(embeds []*utils.Embed, ephemeral bool) error

ReplyEmbeds send embed messages to the command

func (*Event) ReplyEmbedsEphemeral added in v2.1.0

func (ev *Event) ReplyEmbedsEphemeral(embeds []*utils.Embed) error

ReplyEmbedsEphemeral send embed messages to the command with ephemeral

func (*Event) ReplyEphemeral added in v2.1.0

func (ev *Event) ReplyEphemeral(content string) error

ReplyEphemeral send string message to the command with ephemeral

type Executor added in v2.1.0

type Executor struct {
	Data    *discordgo.ApplicationCommand
	Execute func(event *Event) error
}

type Handler added in v2.1.0

type Handler struct {
	GuildId  string // Guild Command
	Commands []*Executor
}

func (*Handler) AddCommand added in v2.1.0

func (c *Handler) AddCommand(command Executor)

AddCommand add command to the command handler

func (*Handler) Build added in v2.1.0

func (c *Handler) Build(session *discordgo.Session, event *discordgo.InteractionCreate)

Build building command handler

func (*Handler) DropCommand added in v2.1.0

func (c *Handler) DropCommand(name string)

DropCommand drop command from the command handler

func (*Handler) GetCommand added in v2.1.0

func (c *Handler) GetCommand(name string) *Executor

GetCommand get command by name

func (*Handler) RegisterCommand added in v2.1.0

func (c *Handler) RegisterCommand(session *discordgo.Session)

RegisterCommand register command to the discord

func (*Handler) UnregisterCommand added in v2.1.0

func (c *Handler) UnregisterCommand(session *discordgo.Session)

UnregisterCommand unregister command from the discord

Jump to

Keyboard shortcuts

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