utils

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAlias

func GetAlias(ctx context.Context) []string

GetAlias returns Command Aliases from Context.

func GetArgs

func GetArgs(ctx context.Context) []string

GetArgs returns Command Args from Context.

func GetErr

func GetErr(ctx context.Context) error

GetErr returns a Command Err from Context, not to be confused with the default Context error.

func GetMsg

func GetMsg(ctx context.Context) *discordgo.Message

GetMsg returns a Discord Message from Context. If Message not present, returns nil.

func GetPrefix

func GetPrefix(ctx context.Context) string

GetPrefix returns a Command Prefix from Context.

func GetSes

func GetSes(ctx context.Context) *discordgo.Session

GetSes returns a Discord Session from Context. If Session not present, returns nil.

func WithAlias

func WithAlias(ctx context.Context, aliases []string) context.Context

WithAlias attaches Command Aliases to Context.

func WithArgs

func WithArgs(ctx context.Context, args []string) context.Context

WithArgs attaches Command Args to Context.

func WithErr

func WithErr(ctx context.Context, err error) context.Context

WithErr attaches a Command Err to Context.

func WithMsg

func WithMsg(ctx context.Context, msg *discordgo.Message) context.Context

WithMsg attaches a Discord Message to Context.

func WithPrefix

func WithPrefix(ctx context.Context, prefix string) context.Context

WithPrefix attaches a Command Prefix to Context.

func WithSes

func WithSes(ctx context.Context, ses *discordgo.Session) context.Context

WithSes attaches a Discord Session to Context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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