From 62a70c52c63055ae88cb76ca71f6810073bf19fd Mon Sep 17 00:00:00 2001 From: bobloy Date: Tue, 29 Sep 2020 17:17:49 -0400 Subject: [PATCH] Some weird error with dm-ing keeps happening, add better log to catch it --- werewolf/role.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/werewolf/role.py b/werewolf/role.py index 0997b56..e267283 100644 --- a/werewolf/role.py +++ b/werewolf/role.py @@ -120,7 +120,11 @@ class Role(WolfListener): if self.channel_name: await self.game.register_channel(self.channel_name, self) - await self.player.send_dm(self.game_start_message) # Maybe embeds eventually + try: + await self.player.send_dm(self.game_start_message) # Maybe embeds eventually + except AttributeError as e: + log.exception(self.__repr__()) + raise e async def kill(self, source): """