BotsSetBotMenuButton.deserialize constructor

BotsSetBotMenuButton.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory BotsSetBotMenuButton.deserialize(BinaryReader reader) {
  // Read [BotsSetBotMenuButton] fields.
  final userId = reader.readObject() as InputUserBase;
  final button = reader.readObject() as BotMenuButtonBase;

  // Construct [BotsSetBotMenuButton] object.
  final returnValue = BotsSetBotMenuButton(
    userId: userId,
    button: button,
  );

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