Когда боту пишут сообщения, то я получаю ошибку:
ERROR:vkbottle:"MessageMin" is immutable and does not support item assignment
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/vkbottle/dispatch/base.py", line 22, in route
await view.handle_event(event, ctx_api, self.state_dispenser)
File "/usr/local/lib/python3.9/site-packages/vkbottle/dispatch/views/abc/message.py", line 50, in handle_event
message.state_peer = await state_dispenser.cast(self.get_state_key(message))
File "pydantic/main.py", line 360, in pydantic.main.BaseModel.__setattr__
TypeError: "MessageMin" is immutable and does not support item assignment
Подскажите, как исправить?
vkbottle==4.3.1
python 3.9
# -*- coding: utf-8 -*-
import logging
from vkbottle import Bot
from vkbottle.bot import Message
bot = Bot("token")
logging.basicConfig(level=logging.INFO)
@bot.on.private_message(text="/1")
async def del_(message: Message):
print(123)
bot.run_forever()