telegram-bot-api-6.5: Easy to use library for building Telegram bots. Exports Telegram Bot API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Telegram.Bot.API.Games

Synopsis

Types

SendGameRequest

data SendGameRequest Source #

Constructors

SendGameRequest 

Fields

Instances

Instances details
FromJSON SendGameRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

ToJSON SendGameRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

Generic SendGameRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

Associated Types

type Rep SendGameRequest :: Type -> Type #

Show SendGameRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SendGameRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SendGameRequest = D1 ('MetaData "SendGameRequest" "Telegram.Bot.API.Games" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "SendGameRequest" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sendGameChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChatId) :*: S1 ('MetaSel ('Just "sendGameMessageThreadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageThreadId))) :*: (S1 ('MetaSel ('Just "sendGameGameShortName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "sendGameDisableNotification") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "sendGameProtectContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendGameReplyToMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId))) :*: (S1 ('MetaSel ('Just "sendGameAllowSendingWithoutReply") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sendGameReplyMarkup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InlineKeyboardMarkup))))))

SetGameScoreRequest

data SetGameScoreRequest Source #

Constructors

SetGameScoreRequest 

Fields

Instances

Instances details
FromJSON SetGameScoreRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

ToJSON SetGameScoreRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

Generic SetGameScoreRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

Associated Types

type Rep SetGameScoreRequest :: Type -> Type #

Show SetGameScoreRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SetGameScoreRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SetGameScoreRequest = D1 ('MetaData "SetGameScoreRequest" "Telegram.Bot.API.Games" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "SetGameScoreRequest" 'PrefixI 'True) ((S1 ('MetaSel ('Just "setGameScoreUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: (S1 ('MetaSel ('Just "setGameScoreScore") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "setGameScoreForce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "setGameScoreDisableEditMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "setGameScoreChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ChatId))) :*: (S1 ('MetaSel ('Just "setGameScoreMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId)) :*: S1 ('MetaSel ('Just "setGameScoreInlineMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId))))))

SetGameScoreResult

data SetGameScoreResult Source #

Instances

Instances details
FromJSON SetGameScoreResult Source # 
Instance details

Defined in Telegram.Bot.API.Games

ToJSON SetGameScoreResult Source # 
Instance details

Defined in Telegram.Bot.API.Games

Generic SetGameScoreResult Source # 
Instance details

Defined in Telegram.Bot.API.Games

Associated Types

type Rep SetGameScoreResult :: Type -> Type #

Show SetGameScoreResult Source # 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SetGameScoreResult Source # 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SetGameScoreResult = D1 ('MetaData "SetGameScoreResult" "Telegram.Bot.API.Games" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "SetGameScoreMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Message)) :+: C1 ('MetaCons "SetGameScoreMessageBool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

GetGameHighScoresRequest

data GetGameHighScoresRequest Source #

Constructors

GetGameHighScoresRequest 

Fields

Instances

Instances details
Generic GetGameHighScoresRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

Associated Types

type Rep GetGameHighScoresRequest :: Type -> Type #

Show GetGameHighScoresRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

type Rep GetGameHighScoresRequest Source # 
Instance details

Defined in Telegram.Bot.API.Games

type Rep GetGameHighScoresRequest = D1 ('MetaData "GetGameHighScoresRequest" "Telegram.Bot.API.Games" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "GetGameHighScoresRequest" 'PrefixI 'True) ((S1 ('MetaSel ('Just "getGameHighScoresUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: S1 ('MetaSel ('Just "getGameHighScoresChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ChatId))) :*: (S1 ('MetaSel ('Just "getGameHighScoresMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId)) :*: S1 ('MetaSel ('Just "getGameHighScoresInlineMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId)))))

Methods

sendGame

sendGame :: SendGameRequest -> ClientM (Response Message) Source #

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

setGameScore

setGameScore :: SetGameScoreRequest -> ClientM (Response SetGameScoreResult) Source #

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

getGameHighScores