Fix issue with private messages.
This commit is contained in:
parent
8f2f18b73b
commit
227b1af986
@ -68,7 +68,11 @@ class FjerkroaBot(commands.Bot):
|
||||
await self.respond(msg, message.channel)
|
||||
|
||||
async def respond(self, message: AIMessage, channel: TextChannel) -> None:
|
||||
logging.info(f"handle message {str(message)} for channel {channel.name}")
|
||||
try:
|
||||
channel_name = channel.name
|
||||
except Exception:
|
||||
channel_name = str(channel.id)
|
||||
logging.info(f"handle message {str(message)} for channel {channel_name}")
|
||||
async with channel.typing():
|
||||
response = await self.airesponder.send(message)
|
||||
if response.hack:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user