K
K
kickass772022-04-10 15:24:10
Search Engine Optimization
kickass77, 2022-04-10 15:24:10

Where is the chat id in aiogram here?

@dp.message_handler(content_types=['new_chat_members'])
async def send_welcome(message: types.Message):
    bot_obj = await bot.get_me()
    bot_id = bot_obj.id
    
    for chat_member in message.new_chat_members:
        if chat_member.id == bot_id:
            await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.")


The bot sends a message when this bot is added to a chat.
I don’t understand where the chat id is, where is this message sent?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Ankhena, 2016-09-08
@Ankhena

1. The snippet does not match the request well and is not attractive to the seekers, but is attractive to the "neighbors".
2. Issuance for different people is different.
3. Look in wordstat query with quotation marks

V
Vladislav Ivashchenko, 2016-09-08
@ivaschenko

In Wordstat, is the frequency base, phrase or exact?
I guess it's basic.
This is the answer to your question.

S
soremix, 2022-04-10
@SoreMix

Specifically, there is no chat id anywhere, only id of new users

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question