class Chat
This object represents a chat.¶ ↑
Public Instance Methods
channel?()
click to toggle source
Returns true if chat type is channel else false is returned.
# File lib/objects/chat.rb, line 49 def channel? type.eql? 'channel' end
has_title?()
click to toggle source
Returns true if chat has title else false is returned.
# File lib/objects/chat.rb, line 54 def has_title? title.nil? end
id()
click to toggle source
Unique identifier for this chat.
# File lib/objects/chat.rb, line 17 def id @chat.id end
private?()
click to toggle source
Returns true if chat type is private else false is returned.
# File lib/objects/chat.rb, line 39 def private? type.eql? 'private' end
supergroup?()
click to toggle source
Returns true if chat type is supergroup else false is returned.
# File lib/objects/chat.rb, line 44 def supergroup? type.eql? 'supergroup' end
title()
click to toggle source
Optional
. Title, for supergroups
, channels
and group
chats.
# File lib/objects/chat.rb, line 28 def title @chat.title end
type()
click to toggle source
Type of chat, can be either private
, group
, supergroup
or channel
.
# File lib/objects/chat.rb, line 23 def type @chat.type end
username()
click to toggle source
Optional
. Username, for private
chats, supergroups
and channels
if available else nil is returned.
# File lib/objects/chat.rb, line 34 def username @chat.username end