コード例 #1
0
        public async void SendMessage(TelegramBotClient botClient)
        {
            Message mes = await botClient.SendInvoiceAsync(
                chatId : _message.From.Id,
                title : "Оплата за пост",
                description : $"{TextMessage}{adminPost.PostText}",
                payload : "Pay is post",
                providerToken : "632593626:TEST:i56982357197",
                startParameter : "HEllo",
                currency : "UAH",
                prices : new[] { new LabeledPrice("price", 5000), },
                replyMarkup : InlineButton.Payment()
                );

            await Task.Run(() => botClient.EditMessage(CommandName.Chat, _message.Message.MessageId, $"{user.Username} принял пост \n\n{adminPost.PostText}", "46 - AnswerAdmin"));
        }