Documentation ¶
Index ¶
- Variables
- func CbCommand(bot *gotgbot.Bot, ctx *ext.Context) error
- func CbOpen(bot *gotgbot.Bot, ctx *ext.Context) error
- func CommandHandler(bot *gotgbot.Bot, ctx *ext.Context) error
- func Contains(l []string, v string) bool
- func CreateJWPoster(backdropURL, posterURL, id string) *bytes.Buffer
- func GetIMDbTitle(id string) (gotgbot.InputMediaPhoto, [][]gotgbot.InlineKeyboardButton, error)
- func GetJWTitle(id string) (gotgbot.InputMediaPhoto, [][]gotgbot.InlineKeyboardButton, error)
- func GetOMDbTitle(id string) (gotgbot.InputMediaPhoto, [][]gotgbot.InlineKeyboardButton, error)
- func IMDbCommand(bot *gotgbot.Bot, ctx *ext.Context) error
- func IMDbInlineSearch(query string) []gotgbot.InlineQueryResult
- func InlineQueryHandler(bot *gotgbot.Bot, ctx *ext.Context) error
- func InlineResultHandler(bot *gotgbot.Bot, ctx *ext.Context) error
- func JWCommand(bot *gotgbot.Bot, ctx *ext.Context) error
- func JWInlineSearch(query string) []gotgbot.InlineQueryResult
- func OMDbInlineSearch(query string) []gotgbot.InlineQueryResult
- func Start(bot *gotgbot.Bot, ctx *ext.Context) error
- func UploadEnvssh(data *bytes.Buffer, id string) (string, error)
- func UploadTelegraph(data *bytes.Buffer, mediaType string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var Dispatcher *ext.Dispatcher = ext.NewDispatcher(&ext.DispatcherOpts{ Error: func(b *gotgbot.Bot, ctx *ext.Context, err error) ext.DispatcherAction { fmt.Println("an error occurred while handling update:", err.Error()) return ext.DispatcherActionNoop }, MaxRoutines: ext.DefaultMaxRoutines, })
var (
PrivacyText = `
This bot does not connect to any datbase and hence does not store any user data in any form.
`
)
Functions ¶
func CommandHandler ¶
CommandHandler handles any command except start.
func CreateJWPoster ¶
Creates a poster image with a backdrop and poster as overlay.
func GetIMDbTitle ¶
Gets an imdb title by it's id and returns an InputPhoto to be used.
func GetJWTitle ¶
Gets a justwatch title by id and build the message that should be sent or edited.
func GetOMDbTitle ¶
Gets an imdb title by it's id and returns an InputPhoto to be used.
func IMDbCommand ¶
IMDbCommand handles the /imdb command.
func IMDbInlineSearch ¶
func IMDbInlineSearch(query string) []gotgbot.InlineQueryResult
ImdbInlineSearch searches for query on imdb and returns results to be used in inline queries.
func InlineQueryHandler ¶
Function that handles all inline queries.
func InlineResultHandler ¶
Edit message after the result is chosen.
func JWInlineSearch ¶
func JWInlineSearch(query string) []gotgbot.InlineQueryResult
JWInlineSearch searches for query on justwatch and returns results to be used in inline queries.
func OMDbInlineSearch ¶
func OMDbInlineSearch(query string) []gotgbot.InlineQueryResult
OmdbInlineSearch searches for query on omdb and returns results to be used in inline queries.
func UploadEnvssh ¶
UploadEnvssh uploads photo/video to envs.sh. Media type should either be "video" or "photo". "Animation" is considered "video" here.
func UploadTelegraph ¶
https://github.com/StarkBotsIndustries/telegraph Upload photo/video to Telegra.ph on the '/upload' endpoint. Media type should either be "video" or "photo". "Animation" is considered "video" here.
Types ¶
This section is empty.