async Task HandleUpdateAsync(ITelegramBotClient botClient, Update update, CancellationToken cancellationToken){ // Only process Message updates: https://core.telegram.org/bots/api#message if (update.Message is not { } message) return; // Only process text messages if (message.Text is not { } messageText) return;
async Task HandleUpdateAsync(ITelegramBotClient botClient, Update update, CancellationToken cancellationToken){ // Only process Message updates: https://core.telegram.org/bots/api#message if (update.Message is not { } message) return; // Only process text messages if (message.Text is not { } messageText) return;
So I'm looking into building a bot for telegram with C# but I don't fully understand what is going on here. What this
update.Message is not { } message
update.Message is not { } message
does? Can I add "rules" inside the curly braces to make it so it has a early return?