Skip to content

Instantly share code, notes, and snippets.

@k0dep
Created June 23, 2020 21:34
Show Gist options
  • Select an option

  • Save k0dep/da76660b128319d30548b20a4113e5ec to your computer and use it in GitHub Desktop.

Select an option

Save k0dep/da76660b128319d30548b20a4113e5ec to your computer and use it in GitHub Desktop.
C# telegram bot handle message
static async Task BotOnMessageReceived(Message message) {
Console.WriteLine($"Receive message type: {message.Type}");
if (message.Type != MessageType.Text)
return;
await Bot.SendTextMessageAsync(message.Chat.Id, $"Received {message.Text}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment