supermessage

package
v0.0.0-...-f0c0f71 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SuperMessage

type SuperMessage struct {
	Self    *discordgo.Message
	Content string
	Session *discordgo.Session
	Prefix  string
}

SuperMessage provide a struct for common functionality for Message.Content manipulation.

func New

New return a new Message structure.

func (*SuperMessage) Arguments

func (sm *SuperMessage) Arguments() []string

Arguments returns a []string without the prefix!command element.

func (*SuperMessage) ChannelSend

func (sm *SuperMessage) ChannelSend(str string, args ...any) (*discordgo.Message, error)

ChannelSend sends a message to the message author channel without mentions allowed.

func (*SuperMessage) ChannelSendComplex

func (sm *SuperMessage) ChannelSendComplex(data *discordgo.MessageSend) (*discordgo.Message, error)

ChannelSendComplex send a message with complex options.

func (*SuperMessage) ChannelSendEmbed

func (sm *SuperMessage) ChannelSendEmbed(embed *discordgo.MessageEmbed) (*discordgo.Message, error)

func (*SuperMessage) ChannelSendEmbedUnsafe

func (sm *SuperMessage) ChannelSendEmbedUnsafe(embed *discordgo.MessageEmbed) (*discordgo.Message, error)

func (*SuperMessage) ChannelSendUnsafe

func (sm *SuperMessage) ChannelSendUnsafe(str string, args ...any) (*discordgo.Message, error)

ChannelSendUnsafe sends a message to the message author channel with mentions allowed.

func (*SuperMessage) Command

func (sm *SuperMessage) Command() string

Command returns the first element who starts with the prefix.

func (*SuperMessage) PlainContent

func (sm *SuperMessage) PlainContent() string

PlainContent returns the message content without the prefix!command.

func (*SuperMessage) StartsWithPrefix

func (sm *SuperMessage) StartsWithPrefix(str string) bool

StartsWithPrefix returns true if the message starts with the prefix.

Jump to

Keyboard shortcuts

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