UpdateBotCommands.deserialize constructor

UpdateBotCommands.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory UpdateBotCommands.deserialize(BinaryReader reader) {
  // Read [UpdateBotCommands] fields.
  final peer = reader.readObject() as PeerBase;
  final botId = reader.readInt64();
  final commands = reader.readVectorObject<BotCommandBase>();

  // Construct [UpdateBotCommands] object.
  final returnValue = UpdateBotCommands(
    peer: peer,
    botId: botId,
    commands: commands.items,
  );

  // Now return the deserialized [UpdateBotCommands].
  return returnValue;
}