Documentation ¶
Index ¶
- func New(ac *appcontext.Context)
- type Users
- func (u *Users) FindByLevel(update *tgbotapi.Update) string
- func (u *Users) FindByName(update *tgbotapi.Update) string
- func (u *Users) FindByTopAttack(update *tgbotapi.Update) string
- func (u *Users) ForeignProfileMessage(update *tgbotapi.Update) string
- func (u *Users) FormatUsername(userName string) string
- func (u *Users) GetPrettyName(user *tgbotapi.User) string
- func (u *Users) Init()
- func (u *Users) ParseProfile(update *tgbotapi.Update, playerRaw *dbmapping.Player) string
- func (u *Users) PlayerBetterThan(playerRaw *dbmapping.Player, powerLevel string) bool
- func (u *Users) ProfileMessage(update *tgbotapi.Update, playerRaw *dbmapping.Player) string
- func (u *Users) UsersList(update *tgbotapi.Update) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Users ¶
type Users struct{}
Users is a function-handling struct for users
func (*Users) FindByLevel ¶
FindByLevel finds user with level and recent profile update
func (*Users) FindByName ¶
FindByName finds user with such username or nickname
func (*Users) FindByTopAttack ¶
FindByTopAttack finds user by top-attack rating
func (*Users) ForeignProfileMessage ¶
ForeignProfileMessage shows profile of another user
func (*Users) FormatUsername ¶
FormatUsername formats Telegram username for posting
func (*Users) GetPrettyName ¶
GetPrettyName returns "pretty" name of user (first_name + last name or username)
func (*Users) ParseProfile ¶
ParseProfile parses user profile, forwarded from PokememBroBot, to database
func (*Users) PlayerBetterThan ¶
PlayerBetterThan return true, if profile is more or equal powerful than provided power level
func (*Users) ProfileMessage ¶
ProfileMessage shows current player's profile
Click to show internal directories.
Click to hide internal directories.