class GetChat

This object is returned only in get_chat methods

It extends from Chat class.

Public Instance Methods

can_set_sticker_set?() click to toggle source

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
description() click to toggle source

Optional. Description, for groups, supergroups and channel chats.

# File lib/objects/chat.rb, line 94
def description
  @chat.description
end
has_description?() click to toggle source

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
has_photo?() click to toggle source

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
permissions() click to toggle source

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
photo() click to toggle source

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
pinned_message() click to toggle source

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
pinned_message?() click to toggle source

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
slow_mode_delay() click to toggle source

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
slow_mode_delay_set?() click to toggle source

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
sticker_set_name() click to toggle source

Optional. For supergroups, name of group sticker set.

# File lib/objects/chat.rb, line 130
def sticker_set_name
  @chat.sticker_set_name
end