executor
                  
                  
                  from aiogram import Bot, Dispatcher, types
                  
                  
                  from aiogram.types import InputFile
                  
                  
                  TOKEN = "test"
                  
                  
                  bot = Bot(token=TOKEN)
                  
                  
                  dp = Dispatcher(bot)
                  
                  
                  
                  
                  
                  @dp.message_handler(commands="start")
                  
                  
                  async def cmd_start(message: types.Message):
                  
                  
                      keyboard = types.ReplyKeyboardMarkup()
                  
                  
                      button_1 = types.KeyboardButton(text="тарифы")
                  
                  
                      keyboard.add(button_1)
                  
                  
                      button_2 = "оплата"
                  
                  
                      keyboard.add(button_2)
                  
                  
                      await message.answer("команда?", reply_markup=keyboard)
                  
                  
                      resize_keyboard=True
                  
                  
                  
                  
                  
                  @dp.message_handler(content_types=['text'])
                  
                  
                  async def get_text_messages(msg: types.Message):
                  
                  
                     if msg.text.lower() == 'hi':
                  
                  
                         photo = InputFile("/storage/emulated/0/mods.py/image%3A18251_eightbit.png")
                  
                  
                         await bot.send_photo(chat_id=message.chat.id, photo=photo)
                  
                  
                     if msg.text.lower() == 'test':
                  
                  
                         await msg.answer('text')
                  
                  
                     if msg.text.lower() == 'test':
                  
                  
                         await msg.answer('test')
                  
                  
                  
                  
                  
                  if name == 'main':
                  
                  
                      executor.start_polling(dp)
                  
                  
                
В что такое
ты сначала из разных мест импортировал разные штуки потом эти же разные штуки импортировал из одного места
Обсуждают сегодня