Class: GetChat
Overview
This object is returned only in get_chat methods
It extends from Chat class.
Instance Method Summary collapse
-
#can_set_sticker_set? ⇒ Boolean
Optional.True, if the bot can change the group sticker set. -
#description ⇒ Object
Optional.Description, forgroups,supergroupsandchannelchats. -
#has_description? ⇒ Boolean
Returns true if description is set to chat else false is returned.
-
#has_photo? ⇒ Boolean
Returns true if photo is set to chat else false is returned.
-
#initialize(chat) ⇒ GetChat
constructor
:nodoc:.
-
#invite_link ⇒ Object
Optional.Chat invite link, forgroups,supergroupsandchannelchats. -
#permissions ⇒ Object
Optional.Default chat member permissions, forgroupsandsupergroups. -
#photo ⇒ Object
Optional. -
#pinned_message ⇒ Object
Optional. -
#pinned_message? ⇒ Boolean
Returns true if message is pinned in chat else false is returned.
-
#slow_mode_delay ⇒ Object
Optional.Forsupergroups,the minimum allowed delay between consecutive messages sent by each unpriviledged user. -
#slow_mode_delay_set? ⇒ Boolean
Returns true if slow mode delay is set in chat.
-
#sticker_set_name ⇒ Object
Optional.Forsupergroups,name of group sticker set.
Methods inherited from Chat
#channel?, #has_title?, #id, #private?, #supergroup?, #title, #type, #username
Constructor Details
#initialize(chat) ⇒ GetChat
:nodoc:
80 81 82 |
# File 'lib/objects/chat.rb', line 80 def initialize(chat) # :nodoc: super(chat) end |
Instance Method Details
#can_set_sticker_set? ⇒ Boolean
Optional. True, if the bot can change the group sticker set.
135 136 137 |
# File 'lib/objects/chat.rb', line 135 def can_set_sticker_set? @chat.can_set_sticker_set end |
#description ⇒ Object
Optional. Description, for groups, supergroups and channel chats.
94 95 96 |
# File 'lib/objects/chat.rb', line 94 def description @chat.description end |
#has_description? ⇒ Boolean
Returns true if description is set to chat else false is returned.
145 146 147 |
# File 'lib/objects/chat.rb', line 145 def has_description? description.nil? end |
#has_photo? ⇒ Boolean
Returns true if photo is set to chat else false is returned.
140 141 142 |
# File 'lib/objects/chat.rb', line 140 def has_photo? photo ? true : false end |
#invite_link ⇒ Object
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.
101 102 103 |
# File 'lib/objects/chat.rb', line 101 def invite_link @chat.invite_link end |
#permissions ⇒ Object
Optional. Default chat member permissions, for groups and supergroups. Returns ChatPermissions object.
116 117 118 119 120 121 |
# File 'lib/objects/chat.rb', line 116 def data = @chat. return ChatPermissions.new(data) if data false end |
#photo ⇒ Object
Optional. Returns ChatPhoto if available else false is returned.
85 86 87 88 89 90 |
# File 'lib/objects/chat.rb', line 85 def photo data = @chat.photo return ChatPhoto.new(data) if data false end |
#pinned_message ⇒ Object
Optional. Pinned message, for groups, supergroups and channels. Returns Message object.
107 108 109 110 111 112 |
# File 'lib/objects/chat.rb', line 107 def data = @chat. return Message.new(data) if data false end |
#pinned_message? ⇒ Boolean
Returns true if message is pinned in chat else false is returned.
150 151 152 |
# File 'lib/objects/chat.rb', line 150 def ? true : false end |
#slow_mode_delay ⇒ Object
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user.
125 126 127 |
# File 'lib/objects/chat.rb', line 125 def slow_mode_delay @chat.slow_mode_delay end |
#slow_mode_delay_set? ⇒ Boolean
Returns true if slow mode delay is set in chat.
155 156 157 |
# File 'lib/objects/chat.rb', line 155 def slow_mode_delay_set? slow_mode_delay ? true : false end |
#sticker_set_name ⇒ Object
Optional. For supergroups, name of group sticker set.
130 131 132 |
# File 'lib/objects/chat.rb', line 130 def sticker_set_name @chat.sticker_set_name end |