discord

package
v0.0.0-...-a537e16 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discord

type Discord struct {
	Session              *discordgo.Session
	Message              *discordgo.MessageCreate
	GuildID              string
	IsInstanceActive     bool
	CommandPrefix        string
	LastChangeAvatarTime time.Time
	RateLimitDuration    time.Duration
}

func NewDiscord

func NewDiscord(session *discordgo.Session) *Discord

NewDiscord initializes a new Discord object with the given session and guild ID.

Parameters: - session: a pointer to a discordgo.Session - guildID: a string representing the guild ID Returns a pointer to a Discord object.

func (*Discord) Commands

func (d *Discord) Commands(s *discordgo.Session, m *discordgo.MessageCreate)

Commands handles the incoming Discord commands.

Parameters:

s: the Discord session
m: the incoming Discord message

func (*Discord) Start

func (d *Discord) Start(guildID string)

Start starts the Discord instance for the specified guild ID.

guildID string

func (*Discord) Stop

func (d *Discord) Stop()

Jump to

Keyboard shortcuts

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