discorder

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deduplicator

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

func NewDeduplicator

func NewDeduplicator(isDuplicaters ...func() bool) *Deduplicator

type DiscordMessage

type DiscordMessage struct {
	ID        types.DiscordMessageID
	Content   string
	Timestamp time.Time
	Embeds    []*discordgo.MessageEmbed
}

type Discorder

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

func NewClient

func NewClient() *Discorder

func (*Discorder) DeleteMessage

func (d *Discorder) DeleteMessage(channelID types.DiscordChannelID, messageID types.DiscordMessageID) error

func (*Discorder) EditMessage

func (d *Discorder) EditMessage(channelID types.DiscordChannelID, messageID types.DiscordMessageID, content string) error

func (*Discorder) GetDiscordSession

func (d *Discorder) GetDiscordSession() *discordgo.Session

func (*Discorder) GetLatestMessages

func (d *Discorder) GetLatestMessages(channelID types.DiscordChannelID) ([]*DiscordMessage, error)

func (*Discorder) GetOwnerID

func (d *Discorder) GetOwnerID(channelID types.DiscordChannelID) (types.DiscordOwnerID, error)

func (*Discorder) SendDeduplicatedMsg

func (d *Discorder) SendDeduplicatedMsg(
	deduplicator *Deduplicator,
	channel types.DiscordChannelID,
	send_callback func(channel types.DiscordChannelID, dg *discordgo.Session) error,
) error

func (*Discorder) SengMessage

func (d *Discorder) SengMessage(channelID types.DiscordChannelID, content string) error

type DuplicatedError

type DuplicatedError struct {
}

func (DuplicatedError) Error

func (d DuplicatedError) Error() string

Jump to

Keyboard shortcuts

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