arguments

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2020 License: Apache-2.0 Imports: 8 Imported by: 3

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"

Functions

This section is empty.

Types

type ChannelMention

type ChannelMention discord.Snowflake

func (*ChannelMention) ID added in v0.0.9

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 Emoji

type Emoji struct {
	ID string

	Custom   bool
	Name     string
	Animated bool
}

func (Emoji) APIString added in v0.0.11

func (e Emoji) APIString() string

func (*Emoji) Parse

func (e *Emoji) Parse(arg string) error

func (Emoji) String added in v0.0.11

func (e Emoji) String() string

func (Emoji) URL added in v0.0.11

func (e Emoji) URL() string

type Flag

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

func (*Flag) Arg

func (f *Flag) Arg(n int) string

func (*Flag) Args

func (f *Flag) Args() []string

func (*Flag) Command added in v0.0.10

func (f *Flag) Command() string

func (*Flag) ParseContent

func (f *Flag) ParseContent(arguments []string) error

func (*Flag) String

func (f *Flag) String() string

func (*Flag) Usage

func (f *Flag) Usage() string

func (*Flag) With

func (f *Flag) With(fs *flag.FlagSet) error

type FlagSet

type FlagSet struct {
	*flag.FlagSet
}

func NewFlagSet

func NewFlagSet() *FlagSet

func (*FlagSet) Usage

func (fs *FlagSet) Usage() string

type RoleMention

type RoleMention discord.Snowflake

func (*RoleMention) ID added in v0.0.9

func (m *RoleMention) ID() discord.Snowflake

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

type UserMention discord.Snowflake

func (*UserMention) ID added in v0.0.9

func (m *UserMention) ID() discord.Snowflake

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

Jump to

Keyboard shortcuts

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