server

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Command = "spotify"

Word of the slash command the verbs are typed after

Variables

This section is empty.

Functions

This section is empty.

Types

type From

type From struct {
	Profile string
	Limited bool
}

Who runs words of /spotify: the profile whose account they act on, and whether a chat app limits the person who typed them to some of its commands, who then runs only the verbs that read; playback and the sign-in are the account owner's

type Verbs

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

The words of /spotify as chats, the screen and the Connect service run them, answered in text a person reads

func Register

func Register(registry *server.Registry, cfg *config.Config, accounts *account.Accounts) *Verbs

Mounts the Spotify service and gives the words of /spotify, which the slash commands run too

func (*Verbs) Control

func (v *Verbs) Control(ctx context.Context, cfg *config.Config, verb, value, device string) (string, error)

Changes what plays on the account of the profile: the verb with what it takes, on the device named by its name or id, the active one when empty; what was done, a sentence

func (*Verbs) Run

func (v *Verbs) Run(ctx context.Context, from From, line string) (string, error)

Runs the line for who typed it: status when it is empty; what it answered, or an error the person reads

Jump to

Keyboard shortcuts

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