P
P
piki_adm2020-06-27 22:26:50
Python
piki_adm, 2020-06-27 22:26:50

How to fix an error in VKbottle?

piece of code:

mes_id = await bot.api.messages.getHistory(user_id=ans.from_id, start_message_id=-1, count=1)

mistake:
Traceback (most recent call last):
  File "C:\Users\Papa\AppData\Local\Programs\Python\Python38\lib\site-packages\vkbottle\framework\framework\swear_handler.py", line 26, in wrapper
    return await func(*args, **kwargs)
  File "C:\Users\Papa\AppData\Local\Programs\Python\Python38\lib\site-packages\vkbottle\framework\bot\processor.py", line 35, in parent_processor
    return await self.message_processor(obj, client_info)
  File "C:\Users\Papa\AppData\Local\Programs\Python\Python38\lib\site-packages\vkbottle\framework\bot\processor.py", line 81, in message_processor
    task = await rules[0].call(*args, **kwargs)
  File "C:\Users\Papa\Desktop\mafia_bot\mafbot.py", line 4473, in game_casino_roulite
    mes_id = await bot.api.messages.getHistory(user_id=ans.from_id, start_message_id=-1, count=1)
AttributeError: 'Messages' object has no attribute 'getHistory'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-06-27
@SoreMix

Documentation vk bottle
https://github.com/timoniq/vkbottle/blob/master/do...

??? danger "All methods must be called by the snake case:" - {--messages.getById--} - no - {++messages.get_by_id++} - yes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question