Ice9Coffee / HoshinoBot

A qqbot for Princess Connect Re:Dive (and other usage :)
GNU General Public License v3.0
1.41k stars 411 forks source link

无法回应除我(su)以外其他群友的命令 #246

Closed Cathgao closed 1 year ago

Cathgao commented 1 year ago

后台日志有如下报错

2022-09-02 15:26:17 ERROR Task exception was never retrieved
future: <Task finished name='Task-193' coro=<CQHttp._handle_event_with_response() done, defined at C:\Users\gao\AppData\Local\Programs\Python\Python39\lib\site-packages\aiocqhttp\__init__.py:606> exception=AttributeError("module 'hoshino.config' has no attribute 'GUILDADMIN'")>
Traceback (most recent call last):
  File "C:\Users\gao\AppData\Local\Programs\Python\Python39\lib\site-packages\aiocqhttp\__init__.py", line 608, in _handle_event_with_response
    response = await self._handle_event(payload)
  File "C:\Users\gao\AppData\Local\Programs\Python\Python39\lib\site-packages\aiocqhttp\__init__.py", line 601, in _handle_event
    filter(lambda r: r is not None, await
  File "C:\Users\gao\AppData\Local\Programs\Python\Python39\lib\site-packages\aiocqhttp\bus.py", line 60, in emit
    results += await run_async_funcs(self._subscribers[event], *args,
  File "C:\Users\gao\AppData\Local\Programs\Python\Python39\lib\site-packages\aiocqhttp\utils.py", line 40, in run_async_funcs
    results += await asyncio.gather(*coros)
  File "C:\Users\gao\Desktop\HoshinoBot\hoshino\service.py", line 193, in wrapper
    if self._check_all(ctx):
  File "C:\Users\gao\Desktop\HoshinoBot\hoshino\service.py", line 166, in _check_all
    return self.check_enabled(gid) and not priv.check_block_group(gid) and priv.check_priv(ev, self.use_priv)
  File "C:\Users\gao\Desktop\HoshinoBot\hoshino\priv.py", line 111, in check_priv
    return bool(get_user_priv(ev) >= require)
  File "C:\Users\gao\Desktop\HoshinoBot\hoshino\priv.py", line 58, in get_user_priv
    if uid in hoshino.config.GUILDADMIN:
AttributeError: module 'hoshino.config' has no attribute 'GUILDADMIN'