more logging
This commit is contained in:
parent
7daad0d28c
commit
c55da197ce
|
@ -1,5 +1,6 @@
|
||||||
# https://github.com/anoadragon453/nio-template
|
# https://github.com/anoadragon453/nio-template
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from types import ModuleType
|
from types import ModuleType
|
||||||
|
@ -149,7 +150,14 @@ class Callbacks:
|
||||||
)
|
)
|
||||||
await command.process()
|
await command.process()
|
||||||
else:
|
else:
|
||||||
logger.debug(f"Bot not reacting to event {event.event_id}.")
|
debug = {
|
||||||
|
'command_prefix': msg.startswith(f'{self.command_prefix} '),
|
||||||
|
'is_dm': room.member_count == 2,
|
||||||
|
'is_thread': is_thread(event),
|
||||||
|
'is_our_thread': await is_this_our_thread(self.client, room, event, self.command_prefix)
|
||||||
|
|
||||||
|
}
|
||||||
|
logger.debug(f"Bot not reacting to event {event.event_id}: {json.dumps(debug)}")
|
||||||
|
|
||||||
async def invite(self, room: MatrixRoom, event: InviteMemberEvent) -> None:
|
async def invite(self, room: MatrixRoom, event: InviteMemberEvent) -> None:
|
||||||
"""Callback for when an invite is received. Join the room specified in the invite.
|
"""Callback for when an invite is received. Join the room specified in the invite.
|
||||||
|
|
Loading…
Reference in New Issue