bot

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddMovieTMDBID           = "ADDMOVIE_TMDBID_"
	AddMovieYes              = "ADDMOVIE_YES"
	AddMovieGoBack           = "ADDMOVIE_GOBACK"
	AddMovieProfileGoBack    = "ADDMOVIE_QUALITY_GOBACK"
	AddMovieRootFolderGoBack = "ADDMOVIE_ROOTFOLDER_GOBACK"
	AddMovieTagsGoBack       = "ADDMOVIE_TAGSGOBACK"
	AddMovieAddOptionsGoBack = "ADDMOVIE_ADDOPTIONS_GOBACK"
	AddMovieCancel           = "ADDMOVIE_CANCEL"
	AddMovieTagsDone         = "ADDMOVIE_TAGS_DONE"
	AddMovieMonSea           = "ADDMOVIE_MONSEA"
	AddMovieMon              = "ADDMOVIE_MON"
	AddMovieUnMon            = "ADDMOVIE_UNMON"
	AddMovieColSea           = "ADDMOVIE_COLSEA"
	AddMovieColMon           = "ADDMOVIE_COLMON"
)
View Source
const (
	AddMovieCommand         = "ADDMOVIE"
	DeleteMovieCommand      = "DELETEMOVIE"
	LibraryMenuCommand      = "LIBRARYMENU"
	LibraryFilteredCommand  = "LIBRARYFILTERED"
	LibraryMovieEditCommand = "LIBRARYMOVIEEDIT"
	CommandsClearedMessage  = "I am not sure what you mean.\nAll commands have been cleared"
)
View Source
const (
	DeleteMovieConfirm      = "DELETE_MOVIE_SUBMIT"
	DeleteMovieCancel       = "DELETE_MOVIE_CANCEL"
	DeleteMovieGoBack       = "DELETE_MOVIE_GOBACK"
	DeleteMovieYes          = "DELETE_MOVIE_YES"
	DeleteMovieTMDBID       = "DELETE_MOVIE_TMDBID_"
	DeleteMovieFirstPage    = "DELETE_MOVIE_FIRST_PAGE"
	DeleteMoviePreviousPage = "DELETE_MOVIE_PREV_PAGE"
	DeleteMovieNextPage     = "DELETE_MOVIE_NEXT_PAGE"
	DeleteMovieLastPage     = "DELETE_MOVIE_LAST_PAGE"
)
View Source
const (
	LibraryMovieDelete    = "LIBRARY_MOVIE_DELETE"
	LibraryMovieDeleteYes = "LIBRARY_MOVIE_DELETE_YES"
	LibraryMovieDeleteNo  = "LIBRARY_MOVIE_DELETE_NO"
	LibraryMovieEdit      = "LIBRARY_MOVIE_EDIT"
	LibraryMovieGoBack    = "LIBRARY_MOVIE_GOBACK"
	//LibraryFilteredGoBack        = "LIBRARY_FILTERED_GOBACK" already defined in librarymenu.go
	LibraryMovieMonitor          = "LIBRARY_MOVIE_MONITOR"
	LibraryMovieUnmonitor        = "LIBRARY_MOVIE_UNMONITOR"
	LibraryMovieSearch           = "LIBRARY_MOVIE_SEARCH"
	LibraryMovieMonitorSearchNow = "LIBRARY_MOVIE_MONITOR_SEARCHNOW"
	LibraryFilteredActive        = "LIBRARYFILTERED"
	//LibraryMenuActive            = "LIBRARYMENU" already defined in librarymenu.go
	LibraryFirstPage    = "LIBRARY_FIRST_PAGE"
	LibraryPreviousPage = "LIBRARY_PREV_PAGE"
	LibraryNextPage     = "LIBRARY_NEXT_PAGE"
	LibraryLastPage     = "LIBRARY_LAST_PAGE"
)
View Source
const (
	MonitorIcon   = "\u2705" // Green checkmark
	UnmonitorIcon = "\u274C" // Red X
)
View Source
const (
	LibraryFilteredGoBack = "LIBRARY_FILTERED_GOBACK"
	LibraryMenu           = "LIBRARY_MENU"
	LibraryCancel         = "LIBRARY_CANCEL"
	LibraryMenuActive     = "LIBRARYMENU"
	LibraryFiltered       = "LIBRARYFILTERED"
	CommandsCleared       = "All commands have been cleared"
)
View Source
const (
	FilterMonitored     = "FILTER_MONITORED"
	FilterUnmonitored   = "FILTER_UNMONITORED"
	FilterMissing       = "FILTER_MISSING"
	FilterWanted        = "FILTER_WANTED"
	FilterOnDisk        = "FILTER_ONDISK"
	FilterShowAll       = "FILTER_SHOWALL"
	FilterSearchResults = "FILTER_SEARCHRESULTS"
)
View Source
const (
	LibraryMovieEditToggleMonitor        = "LIBRARY_MOVIE_EDIT_TOGGLE_MONITOR"
	LibraryMovieEditToggleQualityProfile = "LIBRARY_MOVIE_EDIT_TOGGLE_QUALITY_PROFILE"
	LibraryMovieEditSubmitChanges        = "LIBRARY_MOVIE_EDIT_SUBMIT_CHANGES"
	LibraryMovieEditGoBack               = "LIBRARY_MOVIE_EDIT_GOBACK"
	LibraryMovieEditCancel               = "LIBRARY_MOVIE_EDIT_CANCEL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Config            *config.Config
	Bot               *tgbotapi.BotAPI
	RadarrServer      *radarr.Radarr
	ActiveCommand     map[int64]string
	AddMovieStates    map[int64]*userAddMovie
	DeleteMovieStates map[int64]*userDeleteMovie
	LibraryStates     map[int64]*userLibrary
	// contains filtered or unexported fields
}

func New

func New(config *config.Config, botAPI *tgbotapi.BotAPI, radarrServer *radarr.Radarr) *Bot

func (*Bot) HandleUpdate added in v1.1.0

func (b *Bot) HandleUpdate(update tgbotapi.Update)

func (*Bot) HandleUpdates added in v1.1.0

func (b *Bot) HandleUpdates(updates <-chan tgbotapi.Update)

type Command added in v1.1.0

type Command interface {
	GetChatID() int64
	GetMessageID() int
}

Jump to

Keyboard shortcuts

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