From 6dc366e74a6b7de76909e607dcba24e3d0a93d3a Mon Sep 17 00:00:00 2001 From: Conatum Date: Tue, 12 Sep 2023 01:59:58 +0300 Subject: [PATCH] feat(timers): Revert channel name on destroy. --- src/modules/pomodoro/timer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/pomodoro/timer.py b/src/modules/pomodoro/timer.py index b8825784..eed82814 100644 --- a/src/modules/pomodoro/timer.py +++ b/src/modules/pomodoro/timer.py @@ -731,6 +731,10 @@ class Timer: if self._run_task and not self._run_task.done(): self._run_task.cancel() channelid = self.data.channelid + if self.channel: + task = asyncio.create_task( + self.channel.edit(name=self.data.pretty_name, reason="Reverting timer channel name") + ) await self.data.delete() self.destroyed = True if self.last_status_message: