Class: MTProto::TL::ResetBotCommands

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

Overview

bots.resetBotCommands — clear the bot’s commands for a given scope/language. Returns Bool.

Constant Summary collapse

CONSTRUCTOR =
0x3d8de0f9

Instance Method Summary collapse

Methods included from Binary

#b_u32, #b_u64, #u32_b, #u64_b

Constructor Details

#initialize(scope: { type: :default }, lang_code: '') ⇒ ResetBotCommands

scope: BotCommandScope hash (see BotCommandScope); defaults to default scope.



15
16
17
18
# File 'lib/mtproto/tl/objects/reset_bot_commands.rb', line 15

def initialize(scope: { type: :default }, lang_code: '')
  @scope = scope
  @lang_code = lang_code
end

Instance Method Details

#serializeObject



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

def serialize
  result = u32_b(CONSTRUCTOR)
  result += BotCommandScope.serialize(@scope)
  result += serialize_tl_string(@lang_code)
  result
end