telegram-bot-api-7.4.4: Easy to use library for building Telegram bots. Exports Telegram Bot API.
Safe HaskellNone
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 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SendGameRequest = D1 ('MetaData "SendGameRequest" "Telegram.Bot.API.Games" "telegram-bot-api-7.4.4-CbkblO6b3n86XenTUj4wdS" 'False) (C1 ('MetaCons "SendGameRequest" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sendGameBusinessConnectionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe BusinessConnectionId)) :*: 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 "sendGameMessageEffectId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "sendGameReplyToMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId)) :*: (S1 ('MetaSel ('Just "sendGameReplyParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ReplyParameters)) :*: S1 ('MetaSel ('Just "sendGameReplyMarkup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InlineKeyboardMarkup)))))))
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-7.4.4-CbkblO6b3n86XenTUj4wdS" 'False) (C1 ('MetaCons "SendGameRequest" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sendGameBusinessConnectionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe BusinessConnectionId)) :*: 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 "sendGameMessageEffectId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "sendGameReplyToMessageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MessageId)) :*: (S1 ('MetaSel ('Just "sendGameReplyParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ReplyParameters)) :*: 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 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SetGameScoreRequest = D1 ('MetaData "SetGameScoreRequest" "Telegram.Bot.API.Games" "telegram-bot-api-7.4.4-CbkblO6b3n86XenTUj4wdS" '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 InlineMessageId))))))
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-7.4.4-CbkblO6b3n86XenTUj4wdS" '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 InlineMessageId))))))

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 
Instance details

Defined in Telegram.Bot.API.Games

type Rep SetGameScoreResult = D1 ('MetaData "SetGameScoreResult" "Telegram.Bot.API.Games" "telegram-bot-api-7.4.4-CbkblO6b3n86XenTUj4wdS" '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)))
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-7.4.4-CbkblO6b3n86XenTUj4wdS" '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 
Instance details

Defined in Telegram.Bot.API.Games

type Rep GetGameHighScoresRequest = D1 ('MetaData "GetGameHighScoresRequest" "Telegram.Bot.API.Games" "telegram-bot-api-7.4.4-CbkblO6b3n86XenTUj4wdS" '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 InlineMessageId)))))
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-7.4.4-CbkblO6b3n86XenTUj4wdS" '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 InlineMessageId)))))

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