commands

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const Version string = "1.4.2"

Version holds the bot's version number

Variables

View Source
var (

	// FontRegular is the name for the regular typed font.
	FontRegular = lib.LocGet("static/fonts/NotoSans-Regular.ttf")

	// FontBold is the name for the bold typed font.
	FontBold = lib.LocGet("static/fonts/NotoSans-Bold.ttf")

	// AlbumPositions is the album grid positions.
	AlbumPositions = []lib.AlbumPosition{
		{
			X: 355,
			Y: 170,
			Shadow: lib.Shadow{
				X: 350,
				Y: 165,
				R: 10,
			},
			Info: lib.InfoText{
				X: 350,
				Y: 340,
				Plays: lib.PlaysText{
					X: 350,
					Y: 360,
				},
			},
		},
		{
			X: 555,
			Y: 170,
			Shadow: lib.Shadow{
				X: 550,
				Y: 165,
				R: 10,
			},
			Info: lib.InfoText{
				X: 550,
				Y: 340,
				Plays: lib.PlaysText{
					X: 550,
					Y: 360,
				},
			},
		},
		{
			X: 355,
			Y: 390,
			Shadow: lib.Shadow{
				X: 350,
				Y: 385,
				R: 10,
			},
			Info: lib.InfoText{
				X: 350,
				Y: 560,
				Plays: lib.PlaysText{
					X: 350,
					Y: 580,
				},
			},
		},
		{
			X: 555,
			Y: 390,
			Shadow: lib.Shadow{
				X: 550,
				Y: 385,
				R: 10,
			},
			Info: lib.InfoText{
				X: 550,
				Y: 560,
				Plays: lib.PlaysText{
					X: 550,
					Y: 580,
				},
			},
		},
	}

	// TrackPositions is the positions for track listings.
	TrackPositions = []lib.TrackPosition{
		{
			X: 720,
			Y: 180,
			Plays: lib.PlaysText{
				X: 735,
				Y: 200,
			},
		},
		{
			X: 720,
			Y: 230,
			Plays: lib.PlaysText{
				X: 735,
				Y: 250,
			},
		},
		{
			X: 720,
			Y: 280,
			Plays: lib.PlaysText{
				X: 735,
				Y: 300,
			},
		},
		{
			X: 720,
			Y: 330,
			Plays: lib.PlaysText{
				X: 735,
				Y: 350,
			},
		},
		{
			X: 720,
			Y: 380,
			Plays: lib.PlaysText{
				X: 735,
				Y: 400,
			},
		},
		{
			X: 720,
			Y: 430,
			Plays: lib.PlaysText{
				X: 735,
				Y: 450,
			},
		},
		{
			X: 720,
			Y: 480,
			Plays: lib.PlaysText{
				X: 735,
				Y: 500,
			},
		},
		{
			X: 720,
			Y: 530,
			Plays: lib.PlaysText{
				X: 735,
				Y: 550,
			},
		},
	}
)

Functions

This section is empty.

Types

type About

type About struct {
	Command
	Version string
}

About command.

func InitAbout

func InitAbout() About

InitAbout initialized the about command.

func (About) Register

func (c About) Register() *atlas.Command

Register registers and runs the about command.

type Bandinfo

type Bandinfo struct{ Command }

Bandinfo command.

func InitBandinfo

func InitBandinfo() Bandinfo

InitBandinfo initializes the bandinfo command.

func (Bandinfo) Register

func (c Bandinfo) Register() *atlas.Command

Register registers and runs the bandinfo command.

type Chart

type Chart struct{ Command }

Chart command.

func InitChart

func InitChart() Chart

InitChart initializes the chart command.

func (Chart) Register

func (c Chart) Register() *atlas.Command

Register registers and runs the chart command.

type Command

type Command struct {
	CommandInterface *atlas.Command
	Lastfm           *lastfm.API
}

Command is the base command object for all commands.

func Init

func Init(t *CommandItem) Command

Init initializes atlas commands

type CommandItem

type CommandItem struct {
	Name        string
	Description string
	Aliases     []string
	Usage       string
	Parameters  []Parameter
	Admin       bool
}

CommandItem is the base command item object for the help command.

type CrownBoard

type CrownBoard struct{ Command }

CrownBoard command.

func InitCrownBoard

func InitCrownBoard() CrownBoard

InitCrownBoard initializes the crownboard command.

func (CrownBoard) Register

func (c CrownBoard) Register() *atlas.Command

Register registers and runs the crownboard command.

type Crowns

type Crowns struct{ Command }

Crowns command.

func InitCrowns

func InitCrowns() Crowns

InitCrowns initializes the crowns command.

func (Crowns) Register

func (c Crowns) Register() *atlas.Command

Register registers and runs the crowns command.

type DeleteUser

type DeleteUser struct{ Command }

DeleteUser command.

func InitDeleteUser

func InitDeleteUser() DeleteUser

InitDeleteUser initializes the deleteuser command.

func (DeleteUser) Register

func (c DeleteUser) Register() *atlas.Command

Register registers and runs the deleteuser command.

type Help

type Help struct{ Command }

Help command.

func InitHelp

func InitHelp() Help

InitHelp initializes the help command.

func (Help) Register

func (c Help) Register() *atlas.Command

Register registers and runs the help command.

type MatchData

type MatchData struct {
	UserArtistData   fm.Artist
	AuthorArtistData fm.Artist
}

MatchData holds data of matched artists for caller and recipient.

type Newtaste

type Newtaste struct{ Command }

Newtaste command.

func InitNewtaste

func InitNewtaste() Newtaste

InitNewtaste initializes the newtaste command.

func (Newtaste) Register

func (c Newtaste) Register() *atlas.Command

Register registers and runs the newtaste command.

type Nowplaying

type Nowplaying struct{ Command }

Nowplaying command.

func InitNowPlaying

func InitNowPlaying() Nowplaying

InitNowPlaying initializes the nowplaying command.

func (Nowplaying) Register

func (c Nowplaying) Register() *atlas.Command

Register registers and runs the nowplaying command.

type Parameter

type Parameter struct {
	Name        string // parameter name
	Value       string // value representation
	Description string // parameter description
	Required    bool   // is parameter required?
}

Parameter is the base parameter object for the help command.

type Ping

type Ping struct{ Command }

Ping is a simple testing command.

func InitPing

func InitPing() Ping

InitPing initializes the ping command.

func (Ping) Register

func (c Ping) Register() *atlas.Command

Register registers and runs the ping command.

type Plays

type Plays struct{ Command }

Plays command.

func InitPlays

func InitPlays() Plays

InitPlays initializes the plays command.

func (Plays) Register

func (c Plays) Register() *atlas.Command

Register registers and runs the plays command.

type Profile

type Profile struct{ Command }

Profile command.

func InitProfile

func InitProfile() Profile

InitProfile initializes the profile command.

func (Profile) Register

func (c Profile) Register() *atlas.Command

Register registers and runs the profile command.

type Recent

type Recent struct{ Command }

Recent command.

func InitRecent

func InitRecent() Recent

InitRecent initializes the recent command.

func (Recent) Register

func (c Recent) Register() *atlas.Command

Register registers and runs the recent command.

type Register

type Register struct{ Command }

Register command.

func InitRegister

func InitRegister() Register

InitRegister initializes the login command.

func (Register) Register

func (c Register) Register() *atlas.Command

Register registers and runs the login command.

type RegisterResponse

type RegisterResponse struct {
	Token         string `json:"request_token"`
	Expires       int32  `json:"expires"`
	ExpiresString string `json:"expires_string"`
	Error         bool   `json:"error"`
	ErrorMessage  string `json:"message"`
}

RegisterResponse represents the login API response body.

type Taste

type Taste struct{ Command }

Taste command.

func InitTaste

func InitTaste() Taste

InitTaste initializes the taste command.

func (Taste) Register

func (c Taste) Register() *atlas.Command

Register registers and runs the taste command.

type Unregister

type Unregister struct{ Command }

Unregister command.

func InitUnregister

func InitUnregister() Unregister

InitUnregister initializes the logout command.

func (Unregister) Register

func (c Unregister) Register() *atlas.Command

Register registers and runs the logout command.

type Whoknows

type Whoknows struct{ Command }

Whoknows command.

func InitWhoknows

func InitWhoknows() Whoknows

InitWhoknows initialized the whoknows command.

func (Whoknows) Register

func (c Whoknows) Register() *atlas.Command

Register registers and runs the whoknows command.

type Youtube

type Youtube struct {
	Command
	APIKey  string
	RootURL string
}

Youtube command.

func InitYoutube

func InitYoutube() Youtube

InitYoutube initializes the youtube command.

func (Youtube) Register

func (c Youtube) Register() *atlas.Command

Register registers and runs the youtube command.

Jump to

Keyboard shortcuts

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