discord package - github.com/NekoFluff/discord - Go Packages

discord

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 3 Imported by: 6

README

discord

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Session      *discordgo.Session
	Commands     map[string]Command
	DeveloperIDs []string
}

func NewBot

func NewBot(token string) *Bot

func (*Bot) AddCommands

func (bot *Bot) AddCommands(cmds ...Command)

func (*Bot) RegisterCommands

func (bot *Bot) RegisterCommands()

func (*Bot) SendChannelMessage

func (bot *Bot) SendChannelMessage(channelName string, message string)

func (*Bot) SendDeveloperMessage

func (bot *Bot) SendDeveloperMessage(message string)

func (*Bot) SendEmbedMessage

func (bot *Bot) SendEmbedMessage(channelName string, message *discordgo.MessageEmbed)

func (*Bot) Stop

func (bot *Bot) Stop()

type Command

type Command struct {
	Command discordgo.ApplicationCommand
	Handler func(s *discordgo.Session, m *discordgo.InteractionCreate)
}

Jump to

Keyboard shortcuts

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