bot

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolEmoji

func BoolEmoji(b bool) string

func CreateResult

func CreateResult(app SteamApp) tele.Result

func New

func New() (*tele.Bot, error)

func QueryResults

func QueryResults(games []SteamApp) tele.Results

func RatingPercentage

func RatingPercentage(f float64) string

func RatingStar

func RatingStar(i int) string

func Start

func Start(b *tele.Bot)

Types

type GameData

type GameData struct {
	Steam    SteamApp
	ProtonDB ProtonDBApp
	SDHQ     SDHQApp
}

type ProtonDBApp

type ProtonDBApp struct {
	BestReportedTier string  `json:"bestReportedTier"`
	Confidence       string  `json:"confidence"`
	Score            float64 `json:"score"`
	Tier             string  `json:"tier"`
	Total            int     `json:"total"`
	TrendingTier     string  `json:"trendingTier"`
}

func SearchProtonDB

func SearchProtonDB(steamId string) ProtonDBApp

type SDHQApp

type SDHQApp struct {
	Link string `json:"link"`
	Acf  struct {
		BestOnDeck           bool `json:"best_on_deck"`
		SdhqRating           int  `json:"sdhq_rating"`
		SdhqRatingCategories struct {
			Performance    int    `json:"performance"`
			Visuals        int    `json:"visuals"`
			Stability      int    `json:"stability"`
			Controls       int    `json:"controls"`
			Battery        int    `json:"battery"`
			ScoreBreakdown string `json:"score_breakdown"`
		} `json:"sdhq_rating_categories"`
	} `json:"acf"`
}

func SearchSDHQ

func SearchSDHQ(steamId string) SDHQApp

type SteamApp

type SteamApp struct {
	AppId string `json:"appid"`
	Name  string `json:"name"`
	Icon  string `json:"icon"`
}

func SearchSteam

func SearchSteam(input string) []SteamApp

Jump to

Keyboard shortcuts

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