Class: MTProto::TL::ChannelsEditBanned

Inherits:
Object
  • Object
show all
Includes:
Binary
Defined in:
lib/mtproto/tl/objects/channels_edit_banned.rb

Constant Summary collapse

CONSTRUCTOR =
0x96e6cd81
CHAT_BANNED_RIGHTS =
0x9f120418

Instance Method Summary collapse

Methods included from Binary

#b_u32, #b_u64, #u32_b, #u64_b

Constructor Details

#initialize(channel:, participant:, view_messages: false, send_messages: false, until_date: 0) ⇒ ChannelsEditBanned

Returns a new instance of ChannelsEditBanned.



11
12
13
14
15
16
17
# File 'lib/mtproto/tl/objects/channels_edit_banned.rb', line 11

def initialize(channel:, participant:, view_messages: false, send_messages: false, until_date: 0)
  @channel = channel
  @participant = participant
  @view_messages = view_messages
  @send_messages = send_messages
  @until_date = until_date
end

Instance Method Details

#serializeObject



19
20
21
22
23
24
25
# File 'lib/mtproto/tl/objects/channels_edit_banned.rb', line 19

def serialize
  result = u32_b(CONSTRUCTOR)
  result += serialize_input_channel
  result += serialize_input_peer(@participant)
  result += serialize_banned_rights
  result
end