Exemple #1
0
        public override async void ExecuteAsync(string[] args)
        {
            if (args.Length != 1)
            {
                await writer.WriteLineAsync($"Wrong arguments. Try help {Name}");

                return;
            }

            var bytes = await generator.GetBytes();

            await File.WriteAllBytesAsync(args[0], bytes);

            await writer.WriteLineAsync($"Cat downloaded successfully.\nFull path to file: {args[0]}");
        }
 public async Task ExecuteAsync(Message message, TelegramBotClient botClient)
 {
     await botClient.SendPictureFromBytesAsync(message.Chat.Id, await generator.GetBytes());
 }