Skip to content

Сommon way to get the СhatId of any type message #30

@ffrip

Description

@ffrip
if (update.Type == UpdateType.Message)
    chatId = update.Message.Chat.Id;

but how handle all other types?

if (update.Type != UpdateType.Message)
{
    chatId = ???;
    await bot.SendMessageAsync(chatId, "Message is not a message-type");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions