BotsGetBotInfo.deserialize constructor

BotsGetBotInfo.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory BotsGetBotInfo.deserialize(BinaryReader reader) {
  // Read [BotsGetBotInfo] fields.
  final flags = reader.readInt32();
  final hasBotField = (flags & 1) != 0;
  final bot = hasBotField ? reader.readObject() as InputUserBase : null;
  final langCode = reader.readString();

  // Construct [BotsGetBotInfo] object.
  final returnValue = BotsGetBotInfo(bot: bot, langCode: langCode);

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