class GetChat
This object is returned only in get_chat methods¶ ↑
It extends from Chat
class.
Public Instance Methods
Optional.
True, if the bot can change the group sticker set.
# File lib/objects/chat.rb, line 135 def can_set_sticker_set? @chat.can_set_sticker_set end
Optional.
Description, for groups
, supergroups
and channel
chats.
# File lib/objects/chat.rb, line 94 def description @chat.description end
Returns true if description is set to chat else false is returned.
# File lib/objects/chat.rb, line 145 def has_description? description.nil? end
Returns true if photo is set to chat else false is returned.
# File lib/objects/chat.rb, line 140 def has_photo? photo ? true : false end
Optional.
Chat
invite link, for groups
, supergroups
and channel
chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using export_chat_link.
# File lib/objects/chat.rb, line 101 def invite_link @chat.invite_link end
Optional.
Default chat member permissions, for groups
and supergroups
. Returns ChatPermissions
object.
# File lib/objects/chat.rb, line 116 def permissions data = @chat.permissions return ChatPermissions.new(data) if data false end
Optional
. Returns ChatPhoto
if available else false is returned.
# File lib/objects/chat.rb, line 85 def photo data = @chat.photo return ChatPhoto.new(data) if data false end
Optional
. Pinned message, for groups
, supergroups
and channels.
Returns Message
object.
# File lib/objects/chat.rb, line 107 def pinned_message data = @chat.pinned_message return Message.new(data) if data false end
Returns true if message is pinned in chat else false is returned.
# File lib/objects/chat.rb, line 150 def pinned_message? pinned_message ? true : false end
Optional.
For supergroups,
the minimum allowed delay between consecutive messages sent by each unpriviledged user.
# File lib/objects/chat.rb, line 125 def slow_mode_delay @chat.slow_mode_delay end
Returns true if slow mode delay is set in chat.
# File lib/objects/chat.rb, line 155 def slow_mode_delay_set? slow_mode_delay ? true : false end
Optional.
For supergroups,
name of group sticker set.
# File lib/objects/chat.rb, line 130 def sticker_set_name @chat.sticker_set_name end