package chats
- Alphabetic
- Public
- All
Type Members
- final case class DeleteChatPhoto(chatId: ChatId) extends Product with Serializable
Use this method to delete a chat photo.
Use this method to delete a chat photo. Photos can't be changed for private chats.
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- final case class DeleteChatStickerSet(chatId: ChatId) extends Product with Serializable
Use this method to delete a group sticker set from a supergroup.
Use this method to delete a group sticker set from a supergroup.
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- final case class ExportChatInviteLink(chatId: ChatId) extends Product with Serializable
Use this method to export an invite link to a supergroup or a channel.
Use this method to export an invite link to a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink – after this the link will become available to the bot via the getChat method.
If your bot needs to generate a new invite link replacing its previous one, use exportChatInviteLink again.
Returns exported invite link as String on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- final case class GetChat(chatId: ChatId) extends Product with Serializable
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.)
Returns a DetailedChat object on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- final case class GetChatAdministrators(chatId: ChatId) extends Product with Serializable
Use this method to get a list of administrators in a chat.
Use this method to get a list of administrators in a chat.
On success, returns a list of ChatMember objects that contains information about all chat administrators except other bots.
If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- final case class GetChatMember(chatId: ChatId, userId: Int) extends Product with Serializable
Use this method to get information about a member of a chat.
Use this method to get information about a member of a chat.
Returns a ChatMember object on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- userId
Unique identifier of the target user
- final case class GetChatMembersCount(chatId: ChatId) extends Product with Serializable
Use this method to get the number of members in a chat.
Use this method to get the number of members in a chat.
Returns Int on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- final case class KickChatMember(chatId: ChatId, userId: Int, untilDate: Option[Int] = None) extends Product with Serializable
Use this method to kick a user from a group, a supergroup or a channel.
Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group 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 admin rights.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- userId
Unique identifier of the target user
- untilDate
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
- final case class LeaveChat(chatId: ChatId) extends Product with Serializable
Use this method for your bot to leave a group, supergroup or channel.
Use this method for your bot to leave a group, supergroup or channel.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- final case class PinChatMessage(chatId: ChatId, messageId: Int, disableNotification: Option[Boolean] = None) extends Product with Serializable
Use this method to pin a message in a group, a supergroup, or a channel.
Use this method to pin a message in a group, a supergroup, or a channel.
The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- messageId
Identifier of a message to pin
- disableNotification
True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels.
- final case class PromoteChatMember(chatId: ChatId, userId: Int, canChangeInfo: Option[Boolean] = None, canPostMessages: Option[Boolean] = None, canEditMessages: Option[Boolean] = None, canDeleteMessages: Option[Boolean] = None, canInviteUsers: Option[Boolean] = None, canRestrictMembers: Option[Boolean] = None, canPinMessages: Option[Boolean] = None, canPromoteMembers: Option[Boolean] = None) extends Product with Serializable
Use this method to promote or demote a user in a supergroup or a channel.
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 admin rights.
Pass False for all boolean parameters to demote a user. Returns True on success.
- chatId
Integer or String Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- userId
Unique identifier of the target user
- canChangeInfo
Pass True, if the administrator can change chat title, photo and other settings
- canPostMessages
Pass True, if the administrator can create channel posts, channels only
- canEditMessages
Pass True, if the administrator can edit messages of other users, channels only
- canDeleteMessages
Pass True, if the administrator can delete messages of other users
- canInviteUsers
Pass True, if the administrator can invite new users to the chat
- canRestrictMembers
Pass True, if the administrator can restrict, ban or unban chat members
- canPinMessages
Pass True, if the administrator can pin messages, supergroups only
- canPromoteMembers
Pass True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
- final case class RestrictChatMember(chatId: ChatId, userId: Int, permissions: ChatPermissions, untilDate: Option[Int] = None) extends Product with Serializable
Use this method to restrict a user in a supergroup.
Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- userId
Unique identifier of the target user
- permissions
New user permissions
- untilDate
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
- final case class SendChatAction(chatId: ChatId, action: ChatAction) extends Product with Serializable
Use this method when you need to tell the user that something is happening on the bot's side.
Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait...", the bot may use sendChatAction with action = upload_photo. The user will see a "sending photo" status for the bot. We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- action
Type of action to broadcast
- final case class SetChatAdministratorCustomTitle(chatId: ChatId, userId: Int, customTitle: String) extends Product with Serializable
- final case class SetChatDescription(chatId: ChatId, description: Option[String] = None) extends Product with Serializable
Use this method to change the description of a supergroup or a channel.
Use this method to change the description of a supergroup or a channel.
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- description
New chat description, 0-255 characters
- final case class SetChatPermissions(chatId: ChatId, permissions: ChatPermissions) extends Product with Serializable
Use this method to set default chat permissions for all members.
Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- permissions
New default chat permissions
- final case class SetChatPhoto(chatId: ChatId, photo: InputFile) extends Product with Serializable
Use this method to set a new profile photo for the chat.
Use this method to set a new profile photo for the chat. Photos can't be changed for private chats.
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- photo
New chat photo
- final case class SetChatStickerSet(chatId: ChatId, stickerSetName: String) extends Product with Serializable
Use this method to set a new group sticker set for a supergroup.
Use this method to set a new group sticker set for a supergroup.
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- stickerSetName
Name of the sticker set to be set as the group sticker set
- final case class SetChatTitle(chatId: ChatId, title: String) extends Product with Serializable
Use this method to change the title of a chat.
Use this method to change the title of a chat. Titles can't be changed for private chats.
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- title
New chat title, 1-255 characters
- final case class UnbanChatMember(chatId: ChatId, userId: Int) extends Product with Serializable
Use this method to unban a previously kicked user in a supergroup.
Use this method to unban a previously kicked user in a supergroup. The user will not return to the group automatically, but will be able to join via link, etc.
The bot must be an administrator in the group for this to work. Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- userId
Unique identifier of the target user
- final case class UnpinChatMessage(chatId: ChatId) extends Product with Serializable
Use this method to unpin a message in a group, a supergroup, or a channel.
Use this method to unpin a message in a group, a supergroup, or a channel.
The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel.
Returns True on success.
- chatId
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Value Members
- object DeleteChatPhoto extends Serializable
- object DeleteChatStickerSet extends Serializable
- object ExportChatInviteLink extends Serializable
- object GetChat extends Serializable
- object GetChatAdministrators extends Serializable
- object GetChatMember extends Serializable
- object GetChatMembersCount extends Serializable
- object KickChatMember extends Serializable
- object LeaveChat extends Serializable
- object PinChatMessage extends Serializable
- object PromoteChatMember extends Serializable
- object RestrictChatMember extends Serializable
- object SendChatAction extends Serializable
- object SetChatAdministratorCustomTitle extends Serializable
- object SetChatDescription extends Serializable
- object SetChatPermissions extends Serializable
- object SetChatPhoto extends Serializable
- object SetChatStickerSet extends Serializable
- object SetChatTitle extends Serializable
- object UnbanChatMember extends Serializable
- object UnpinChatMessage extends Serializable