Ejemplo n.º 1
0
        public async Task <IActionResult> Post([FromBody] Update update)
        {
            _client = new TelegramBotClient(_appSettings.BotConfiguration.BotToken);
            var text = update.Message.Text;

            switch (text)
            {
            case "show abusers":
                var result = await _grudgeApi.GetAbuserAsync();

                var answer = "";
                foreach (var item in result)
                {
                    answer += "abuser: "******" what's happened: " + item.Reason;
                    await _client.SendTextMessageAsync(update.Message.Chat.Id, answer);
                }
                break;

            default:
                break;
            }
            return(Ok());
        }
Ejemplo n.º 2
0
 public async Task <IReadOnlyList <GrudgeModel> > GetGrudges()
 {
     return(await _grudgeApi.GetAbuserAsync());
 }
Ejemplo n.º 3
0
        public async Task GetGrudges()
        {
            var test = await _grudgesApi.GetAbuserAsync();

            return;
        }