Liking cljdoc? Tell your friends :D

telegrambot-lib.games.core

Telegram Bot API Games - function implementations.

Most functions are multi-arity with the following options:

  • Send all parameters in a 'content' map.
  • Send only the required parameters as simple values.
  • Send the required paraemters as simple values and then 'optional' parameters in a map.
Telegram Bot API Games - function implementations.
- <https://core.telegram.org/bots/api#games>

Most functions are multi-arity with the following options:
- Send all parameters in a 'content' map.
- Send only the required parameters as simple values.
- Send the required paraemters as simple values and then 'optional' parameters in a map.
raw docstring

behaviorclj

Map for extending the core TBot record with functions.

Map for extending the core TBot record with functions.
sourceraw docstring

get-game-high-scoresclj

(get-game-high-scores this content)
(get-game-high-scores this chat_id message_id user_id)

Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an Array of GameHighScore objects.

Required

  • this ; a bot instance
  • chat_id ; id of the target chat
  • message_id ; id of the sent message
  • user_id ; target user
Use this method to get data for high score tables.
Will return the score of the specified user and several of their neighbors in a game.
On success, returns an Array of GameHighScore objects.

Required
- this ; a bot instance
- chat_id ; id of the target chat
- message_id ; id of the sent message
- user_id ; target user
sourceraw docstring

get-game-high-scores-inlineclj

(get-game-high-scores-inline this content)
(get-game-high-scores-inline this inline_message_id user_id)

Use this method to get data for inline high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an Array of GameHighScore objects.

Required

  • this ; a bot instance
  • inline_message_id ; id of the sent message
  • user_id ; target user
Use this method to get data for inline high score tables.
Will return the score of the specified user and several of their neighbors in a game.
On success, returns an Array of GameHighScore objects.

Required
- this ; a bot instance
- inline_message_id ; id of the sent message
- user_id ; target user
sourceraw docstring

send-gameclj

(send-game this content)
(send-game this chat_id game_short_name)
(send-game this chat_id game_short_name & optional)

Use this method to send a game. On success, the sent Message is returned.

Required

  • this ; a bot instance
  • chat_id ; target chat id
  • game_short_name ; serves as unique id for the game

Optional

  • disable_notification ; send message silently
  • reply_to_message_id ; id of original message
  • allow_sending_without_reply ; true to send message even if replied-to message is not found
  • reply_markup ; inline keyboard markup
Use this method to send a game.
On success, the sent Message is returned.

Required
- this ; a bot instance
- chat_id ; target chat id
- game_short_name ; serves as unique id for the game

Optional
- disable_notification ; send message silently
- reply_to_message_id ; id of original message
- allow_sending_without_reply ; true to send message even if replied-to message is not found
- reply_markup ; inline keyboard markup
sourceraw docstring

set-game-scoreclj

(set-game-score this content)
(set-game-score this chat_id message_id user_id score)
(set-game-score this chat_id message_id user_id score & optional)

Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited Message, otherwise returns True. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

Required

  • this ; a bot instance
  • chat_id ; id of target chat
  • message_id ; id of the sent message
  • user_id ; user identifier
  • score ; new score, non-negative

Optional

  • force ; true if high score is allowed to decrease
  • disable_edit_message ; true if game msg should not be auto edited to include the scoreboard
Use this method to set the score of the specified user in a game.
On success, if the message was sent by the bot, returns the edited Message,
otherwise returns True. Returns an error, if the new score is not greater
than the user's current score in the chat and force is False.

Required
- this ; a bot instance
- chat_id ; id of target chat
- message_id ; id of the sent message
- user_id ; user identifier
- score ; new score, non-negative

Optional
- force ; true if high score is allowed to decrease
- disable_edit_message ; true if game msg should not be auto edited to include the scoreboard
sourceraw docstring

set-game-score-inlineclj

(set-game-score-inline this content)
(set-game-score-inline this inline_message_id user_id score)
(set-game-score-inline this inline_message_id user_id score & optional)

Use this method to set the inline score of the specified user in a game. On success, if the message was sent by the bot, returns the edited Message, otherwise returns True. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.

Required

  • this ; a bot instance
  • inline_message_id ; id of the inline message
  • user_id ; user identifier
  • score ; new score, non-negative

Optional

  • force ; true if high score is allowed to decrease
  • disable_edit_message ; true if game msg should not be auto edited to include the scoreboard
Use this method to set the inline score of the specified user in a game.
On success, if the message was sent by the bot, returns the edited Message,
otherwise returns True. Returns an error, if the new score is not greater
than the user's current score in the chat and force is False.

Required
- this ; a bot instance
- inline_message_id ; id of the inline message
- user_id ; user identifier
- score ; new score, non-negative

Optional
- force ; true if high score is allowed to decrease
- disable_edit_message ; true if game msg should not be auto edited to include the scoreboard
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close