Commit Graph

18 Commits

Author SHA1 Message Date
kotoriのねこ
6b9e06a2e3 Fix imports; refactor add_handlers into handler.py 2022-06-09 15:08:04 +08:00
kotoriのねこ
1818d93388 Refactor conversation handler creations into plugins 2022-06-09 15:08:04 +08:00
洛水.山岭居室
1e94d3197e 修改大部分的 reply_chat_action 2022-05-30 16:08:56 +08:00
deepsource-autofix[bot]
34688cd914 Remove unnecessary f-string 2022-05-28 15:28:44 +08:00
洛水.山岭居室
02fa66f7b6 添加 service.quizcorrect_option 异常时的日记 2022-05-25 17:04:14 +08:00
洛水.山岭居室
11153b582c 尝试修复奇怪的错误
很奇怪,先会这样

`Traceback (most recent call last):
  File "/home/luoshuijs/anaconda3/envs/TGPaimonBot/lib/python3.9/site-packages/python_telegram_bot-20.0a0-py3.9.egg/telegram/ext/_application.py", line 874, in __create_task_callback
    raise exception
  File "/home/luoshuijs/anaconda3/envs/TGPaimonBot/lib/python3.9/site-packages/python_telegram_bot-20.0a0-py3.9.egg/telegram/ext/_application.py", line 846, in __create_task_callback
    return await coroutine
  File "/home/luoshuijs/anaconda3/envs/TGPaimonBot/lib/python3.9/site-packages/python_telegram_bot-20.0a0-py3.9.egg/telegram/ext/_handler.py", line 137, in handle_update
    return await self.callback(update, context)
  File "/root/Projects/TGPaimonBot/plugins/base.py", line 66, in decorator
    return await func(*args, **kwargs)
  File "/root/Projects/TGPaimonBot/plugins/quiz.py", line 95, in command_start
    poll_message = await self.send_poll(update)
  File "/root/Projects/TGPaimonBot/plugins/quiz.py", line 66, in send_poll
    index = options.index(correct_option)
ValueError: '' is not in list`

然后就会一直这样

`Traceback (most recent call last):
  File "/home/luoshuijs/anaconda3/envs/TGPaimonBot/lib/python3.9/site-packages/python_telegram_bot-20.0a0-py3.9.egg/telegram/ext/_application.py", line 929, in process_update
    check = handler.check_update(update)  # Should the handler handle this update?
  File "/home/luoshuijs/anaconda3/envs/TGPaimonBot/lib/python3.9/site-packages/python_telegram_bot-20.0a0-py3.9.egg/telegram/ext/_conversationhandler.py", line 741, in check_update
    for candidate in self.states.get(state, []):
TypeError: unhashable type: 'PendingState'`

但是对于上个错误一直触发我也没办法
2022-05-25 14:24:13 +08:00
洛水.山岭居室
4ae2cccfec 添加用于装饰在指定函数防止过度调用的类装饰器 2022-05-20 18:23:15 +08:00
洛水.山岭居室
5bc96d7598 quizgacha 添加命令请求限制 2022-05-20 14:33:35 +08:00
洛水.山岭居室
ed7618f961 私聊也可以触发答题挑战 2022-05-19 17:33:35 +08:00
洛水.山岭居室
c0a8399442 quiz添加日记 2022-05-17 20:58:44 +08:00
洛水.山岭居室
3b419bc775 quiz添加自动删除 2022-05-17 20:55:40 +08:00
洛水.山岭居室
60bb6bca05 quiz添加自动删除 2022-05-17 20:54:45 +08:00
洛水.山岭居室
4e37d41742 打乱quizauth的选项 2022-05-17 20:46:53 +08:00
洛水.山岭居室
9d5eba02ff 修复绑定国际服写入的错误数据 修改国服名称 2022-04-30 14:51:24 +08:00
洛水.山岭居室
abca8153cd 修复奇怪的BUG 2022-04-20 20:38:34 +08:00
洛水.山岭居室
7424debdad 修复部分BUG 处理重载问题失败抛出的异常处理 2022-04-20 20:31:15 +08:00
洛水.山岭居室
d68ff4d514 Fix some commands cannot use "/cancel" 2022-04-20 15:52:15 +08:00
洛水.山岭居室
760ea19c76 Initial commit 2022-04-14 15:18:45 +08:00