Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActionCancel = "cancel" ActionPlayNow = "play_now" ActionPlayOther = "play_other" ActionSelect = "select" )
Variables ¶
View Source
var PlayCommand = command.Command{ Name: "play", Aliases: []string{"p"}, Deferred: true, Validations: []*command.Validation{validations.MustBeOnAValidVoiceChannel}, Parameters: []*command.Parameter{ {Name: "song", Required: true, Type: parameters.ParameterText}, }, Handler: func(ctx *command.Context) command.Result { t := ctx.T.(*i18n.CommandPlay) input := ctx.Args[0].(string) if res := handleSpotifyLink(ctx, input, t); res != nil { return *res } return searchYoutube(ctx, input, t) }, }
View Source
var (
SpotifyTrackRe = regexp.MustCompile(`^https?:\/\/open.spotify.com\/track\/([^/]+)$`)
)
Functions ¶
func BuildPlayableInfoEmbed ¶
func BuildPlayableInfoEmbed(info PlayableInfo) *model.Embed
Types ¶
type PlayableInfo ¶
type SearchContext ¶
type Selection ¶
type Selection struct { Type SelectionType Index int }
type SelectionType ¶
type SelectionType string
const ( SelectionTypeCancel SelectionType = "cancel" SelectionTypeSelect SelectionType = "select" )
Click to show internal directories.
Click to hide internal directories.