BotsSetBotCommands.deserialize constructor

BotsSetBotCommands.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory BotsSetBotCommands.deserialize(BinaryReader reader) {
  // Read [BotsSetBotCommands] fields.
  final scope = reader.readObject() as BotCommandScopeBase;
  final langCode = reader.readString();
  final commands = reader.readVectorObject<BotCommandBase>();

  // Construct [BotsSetBotCommands] object.
  final returnValue = BotsSetBotCommands(
    scope: scope,
    langCode: langCode,
    commands: commands,
  );

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