Created
June 23, 2020 21:34
-
-
Save k0dep/da76660b128319d30548b20a4113e5ec to your computer and use it in GitHub Desktop.
C# telegram bot handle message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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