welcome

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Channel   string    `json:"channel"`
	ChannelID string    `json:"-"`
	Guild     string    `json:"-"`
	GuildID   string    `json:"-"`
	Messages  []Message `json:"messages"`
}

Configuration is a struct.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is a struct.

func NewWelcomeManager

func NewWelcomeManager(
	session *discordgo.Session,
	guildName string,
	config Configuration,
) *Manager

NewWelcomeManager return a Manager.

func (*Manager) OnMessageReactionAdd added in v1.0.0

func (w *Manager) OnMessageReactionAdd(_ *discordgo.Session, reaction *discordgo.MessageReactionAdd)

OnMessageReactionAdd is public for tests, never call it directly

func (*Manager) OnMessageReactionRemove added in v1.0.0

func (w *Manager) OnMessageReactionRemove(_ *discordgo.Session, reaction *discordgo.MessageReactionRemove)

OnMessageReactionRemove is public for tests, never call it directly

func (*Manager) Run

func (w *Manager) Run() error

Run do the main task of Welcome.

type Message

type Message struct {
	ID                               string
	Title                            string `json:"title"`
	Description                      string `json:"description"`
	Color                            int    `json:"color"`
	Role                             string `json:"role"`
	RoleID                           string
	Emoji                            string `json:"emoji"`
	EmojiID                          string
	CanPurgeReactions                bool `json:"can_purge_reactions"`
	PurgeThresholdMembersReacted     int  `json:"purge_threshold_members_reacted"`
	PurgeBelowCountMembersNotInGuild int  `json:"purge_below_count_members_not_in_guild"`
}

Message is a struct.

Jump to

Keyboard shortcuts

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