data_peer_bot_command.cpp 549 B

123456789101112131415161718192021
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #include "data/data_peer_bot_command.h"
  8. namespace Data {
  9. BotCommand BotCommandFromTL(const MTPBotCommand &result) {
  10. return result.match([](const MTPDbotCommand &data) {
  11. return BotCommand {
  12. .command = qs(data.vcommand().v),
  13. .description = qs(data.vdescription().v),
  14. };
  15. });
  16. }
  17. } // namespace Data