arguments

package
v0.0.0-...-b54cad6 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

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

func NewFlagSet

func NewFlagSet() *flag.FlagSet

Types

type ChannelMention

type ChannelMention 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) Parse

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

type Flag

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

func (*Flag) ParseContent

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

func (*Flag) Usage

func (f *Flag) Usage() string

func (*Flag) With

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

type RoleMention

type RoleMention string

func (*RoleMention) Parse

func (m *RoleMention) Parse(arg string) error

func (*RoleMention) Usage

func (m *RoleMention) Usage() string

type UserMention

type UserMention 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