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.BanChatMember

Synopsis

banChatMember

data BanChatMemberRequest Source #

Request parameters for banChatMember.

Constructors

BanChatMemberRequest 

Fields

  • banChatMemberChatId :: SomeChatId

    Unique identifier for the target chat or username of the target channel (in the format @channelusername)

  • banChatMemberUserId :: UserId

    Unique identifier of the target user

  • banChatMemberUntilDate :: Maybe Int

    Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.

  • banChatMemberRevokeMessages :: Maybe Bool

    Pass True to delete all messages from the chat for the user that is being removed. If False, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels.

Instances

Instances details
FromJSON BanChatMemberRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.BanChatMember

ToJSON BanChatMemberRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.BanChatMember

Generic BanChatMemberRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.BanChatMember

Associated Types

type Rep BanChatMemberRequest :: Type -> Type #

type Rep BanChatMemberRequest Source # 
Instance details

Defined in Telegram.Bot.API.Methods.BanChatMember

type Rep BanChatMemberRequest = D1 ('MetaData "BanChatMemberRequest" "Telegram.Bot.API.Methods.BanChatMember" "telegram-bot-api-6.5-3pY7XQZ5v9zCuyh8HdDMyB" 'False) (C1 ('MetaCons "BanChatMemberRequest" 'PrefixI 'True) ((S1 ('MetaSel ('Just "banChatMemberChatId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SomeChatId) :*: S1 ('MetaSel ('Just "banChatMemberUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UserId)) :*: (S1 ('MetaSel ('Just "banChatMemberUntilDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "banChatMemberRevokeMessages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))

banChatMember :: BanChatMemberRequest -> ClientM (Response Bool) Source #

Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.