Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EmojiRegex = regexp.MustCompile(`<(a?):(.+?):(\d+)>`) ErrInvalidEmoji = errors.New("invalid emoji") )
View Source
var ( ChannelRegex = regexp.MustCompile(`<#(\d+)>`) UserRegex = regexp.MustCompile(`<@!?(\d+)>`) RoleRegex = regexp.MustCompile(`<@&(\d+)>`) )
View Source
var FlagName = "command"
View Source
var Regex = regexp.MustCompile(
`https://(ptb\.|canary\.)?discord(?:app)?\.com/channels/(\d+)/(\d+)/(\d+)`,
)
(empty) so it matches standard links | OR canary. matches canary MessageURL 3 `(\d+)` for guild ID, channel ID and message ID
Functions ¶
This section is empty.
Types ¶
type ChannelMention ¶
func (*ChannelMention) ID ¶ added in v0.0.9
func (m *ChannelMention) ID() discord.ChannelID
func (*ChannelMention) Mention ¶ added in v0.0.11
func (m *ChannelMention) Mention() string
func (*ChannelMention) Parse ¶
func (m *ChannelMention) Parse(arg string) error
func (*ChannelMention) Usage ¶
func (m *ChannelMention) Usage() string
type FlagSet ¶
func NewFlagSet ¶
func NewFlagSet() *FlagSet
type Joined ¶ added in v0.6.0
type Joined string
Joined implements ManualParseable, in case you want all arguments but joined in a uniform way with spaces.
func (*Joined) ParseContent ¶ added in v0.6.0
type MessageURL ¶ added in v0.3.0
type MessageURL struct { GuildID discord.GuildID ChannelID discord.ChannelID MessageID discord.MessageID }
MessageURL contains info from a MessageURL
func ParseMessageURL ¶ added in v0.3.0
func ParseMessageURL(url string) *MessageURL
ParseMessageURL parses the MessageURL into a smartlink
func (*MessageURL) Parse ¶ added in v0.3.0
func (url *MessageURL) Parse(arg string) error
func (*MessageURL) Usage ¶ added in v0.3.0
func (url *MessageURL) Usage() string
type RoleMention ¶
func (*RoleMention) ID ¶ added in v0.0.9
func (m *RoleMention) ID() discord.RoleID
func (*RoleMention) Mention ¶ added in v0.0.11
func (m *RoleMention) Mention() string
func (*RoleMention) Parse ¶
func (m *RoleMention) Parse(arg string) error
func (*RoleMention) Usage ¶
func (m *RoleMention) Usage() string
type UserMention ¶
func (*UserMention) ID ¶ added in v0.0.9
func (m *UserMention) ID() discord.UserID
func (*UserMention) Mention ¶ added in v0.0.11
func (m *UserMention) Mention() string
func (*UserMention) Parse ¶
func (m *UserMention) Parse(arg string) error
func (*UserMention) Usage ¶
func (m *UserMention) Usage() string
Click to show internal directories.
Click to hide internal directories.