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

Telegram.Bot.API.Methods.PromoteChatMember

Synopsis

promoteChatMember

data PromoteChatMemberRequest Source #

Request parameters for promoteChatMember.

Constructors

PromoteChatMemberRequest 

Fields

Instances

Instances details
FromJSON PromoteChatMemberRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.PromoteChatMember

ToJSON PromoteChatMemberRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.PromoteChatMember

Generic PromoteChatMemberRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.PromoteChatMember

Associated Types

type Rep PromoteChatMemberRequest :: Type -> Type #

type Rep PromoteChatMemberRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.PromoteChatMember

type Rep PromoteChatMemberRequest = D1 ('MetaData "PromoteChatMemberRequest" "Telegram.Bot.API.Methods.PromoteChatMember" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "PromoteChatMemberRequest" 'PrefixI 'True) (((S1 ('MetaSel ('Just "promoteChatMemberChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SomeChatId) :*: (S1 ('MetaSel ('Just "promoteChatMemberUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId) :*: S1 ('MetaSel ('Just "promoteChatMemberIsAnonymous") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "promoteChatMemberCanManageChat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "promoteChatMemberCanPostMessages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "promoteChatMemberCanEditMessages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "promoteChatMemberCanDeleteMessages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) :*: ((S1 ('MetaSel ('Just "promoteChatMemberCanManageVideoChats") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "promoteChatMemberCanRestrictMembers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "promoteChatMemberCanPromoteMembers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "promoteChatMemberCanChangeInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "promoteChatMemberCanInviteUsers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "promoteChatMemberCanPinMessages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "promoteChatMemberCanManageTopics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))))

promoteChatMember :: PromoteChatMemberRequest -> ClientM (Response Bool) Source #

Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.