devse-org / devse-chan

🤖 A discord moderation bot and IRC bridge
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

bug: crash when disconnected #32

Open d0p1s4m4 opened 2 years ago

d0p1s4m4 commented 2 years ago

we need to implement a queu

Jan 03 16:52:22 localhost python[105099]: RuntimeError: Not connected
Jan 03 16:52:22 localhost python[105099]: Ignoring exception in on_message
Jan 03 16:52:22 localhost python[105099]: Traceback (most recent call last):
Jan 03 16:52:22 localhost python[105099]:   File "/home/hades/devse-chan/.env/lib/python3.8/site-packages/nextcord/client.py", line 351, in _run_event
Jan 03 16:52:22 localhost python[105099]:     await coro(*args, **kwargs)
Jan 03 16:52:22 localhost python[105099]:   File "/home/hades/devse-chan/devsechan/discord.py", line 30, in on_message
Jan 03 16:52:22 localhost python[105099]:     parent.to_irc(message.author,
Jan 03 16:52:22 localhost python[105099]:   File "/home/hades/devse-chan/devsechan/__init__.py", line 24, in to_irc
Jan 03 16:52:22 localhost python[105099]:     self.irc.send(author, msg)
Jan 03 16:52:22 localhost python[105099]:   File "/home/hades/devse-chan/devsechan/irc/__init__.py", line 65, in send
Jan 03 16:52:22 localhost python[105099]:     self.irc.send('PRIVMSG', target=self.config['channel'].get(), message=f"<{colored_nick}> {message}")
Jan 03 16:52:22 localhost python[105099]:   File "/home/hades/devse-chan/.env/lib/python3.8/site-packages/bottom/client.py", line 181, in send
Jan 03 16:52:22 localhost python[105099]:     self.send_raw(packed_command)
Jan 03 16:52:22 localhost python[105099]:   File "/home/hades/devse-chan/.env/lib/python3.8/site-packages/bottom/client.py", line 66, in send_raw
Jan 03 16:52:22 localhost python[105099]:     raise RuntimeError("Not connected")
d0p1s4m4 commented 2 years ago

related to #11