Использую такой код:
import time
import asyncio
from aiogram.types import ReplyKeyboardRemove, \
ReplyKeyboardMarkup, KeyboardButton, \
InlineKeyboardMarkup, InlineKeyboardButton
from aiogram import Bot, Dispatcher, executor, types
from aiogram.types import ReplyKeyboardRemove
from aiogram.dispatcher.filters import Text
from aiogram.contrib.fsm_storage.memory import MemoryStorage
import sqlite3
# Создание бота
bot = Bot(token="Мой токен")
# Создание диспетчера
storage = MemoryStorage()
dp = Dispatcher(bot, storage=storage)
# Создание таблицы баланса в БД
conn = sqlite3.connect('users.sqlite')
c = conn.cursor()
c.execute('CREATE TABLE IF NOT EXISTS id (id INTEGER NOT NULL)')
conn.commit()
kb = [
[
types.KeyboardButton(text="Начать создавать"),
types.KeyboardButton(text="Как начать?")
],
]
keyboard = types.ReplyKeyboardMarkup(
keyboard=kb,
resize_keyboard=True,
input_field_placeholder="Выберите начальный режим"
)
@dp.message_handler(commands=['start'])
async def process_command_1(message: types.Message):
await message.reply("Привет! я бот, который поможет сгенерировать код для твоего бота! управляй ботом кнопками ниже!", reply_markup=keyboard)
@dp.message_handler(text='Начать создавать')
async def start(message: types.Message):
await bot.send_message(message.chat.id, 'Выберите, что вы хотите добавить в своего бота', reply_markup=kb.ReplyKeyboardRemove())
@dp.message_handler(text='Как начать?')
async def start(message: types.Message):
await bot.send_message(message.chat.id, "Вот статья, в которой я объясню как начать ")
if __name__ == '__main__':
print("Бот запущен")
executor.start_polling(dp, skip_updates=True)
выдаёт такую ошибку:
Task exception was never retrieved
future: <Task finished name='Task-9' coro=<Dispatcher._process_polling_updates() done, defined at /home/runner/MintcreamJuniorFlashdrives/venv/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py:407> exception=AttributeError("'list' object has no attribute 'ReplyKeyboardRemove'")>
Traceback (most recent call last):
File "/home/runner/MintcreamJuniorFlashdrives/venv/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py", line 415, in _process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "/home/runner/MintcreamJuniorFlashdrives/venv/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "/home/runner/MintcreamJuniorFlashdrives/venv/lib/python3.10/site-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "/home/runner/MintcreamJuniorFlashdrives/venv/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py", line 256, in process_update
return await self.message_handlers.notify(update.message)
File "/home/runner/MintcreamJuniorFlashdrives/venv/lib/python3.10/site-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "main.py", line 42, in start
await bot.send_message(message.chat.id, 'Выберите, что вы хотите добавить в своего бота', reply_markup=kb.ReplyKeyboardRemove())
AttributeError: 'list' object has no attribute 'ReplyKeyboardRemove'
помогите исправить