L
L
lifiij2022-03-31 22:12:13
Bots
lifiij, 2022-03-31 22:12:13

'Bot' object has no attribute 'copy_message'. Why is copy_message in aiogram?

from aiogram import Bot, types
from aiogram.dispatcher import Dispatcher
from aiogram.utils import executor


bot = Bot(token='')
dp = Dispatcher(bot)

@dp.message_handler()
async def command_start(message: types.Message):
    await bot.copy_message(chat_id = message.chat.id, from_chat_id = message.from_user.id, message_id  = message.message_id)

if __name__ == '__main__':
    executor.start_polling( dp, skip_updates = True )

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question