aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar SebastiaanZ <[email protected]>2019-07-04 11:26:40 +0200
committerGravatar SebastiaanZ <[email protected]>2019-07-04 11:26:40 +0200
commitb71636247987c62c8c0698d84d9e539bb1827049 (patch)
tree4235954ea3927b4b59af8746d7b1d27762d90cae
parentRemoving the iter/unpacking support on dataclass in favour of multiline if (diff)
parentRemoving redundant self.__class__.__name__ occurrences (diff)
Merge branch 'django-watchchannels' of github.com:python-discord/bot into django-watchchannels
-rw-r--r--bot/cogs/watchchannels/watchchannel.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/cogs/watchchannels/watchchannel.py b/bot/cogs/watchchannels/watchchannel.py
index a0be3b1d6..46b20b4f0 100644
--- a/bot/cogs/watchchannels/watchchannel.py
+++ b/bot/cogs/watchchannels/watchchannel.py
@@ -184,7 +184,7 @@ class WatchChannel(ABC):
self.log.trace(f"Sleeping {BigBrotherConfig.log_delay} seconds before consuming message queue")
await asyncio.sleep(BigBrotherConfig.log_delay)
- self.log.trace(f"{self.__class__.__name__} started consuming the message queue")
+ self.log.trace(f"Started consuming the message queue")
# If the previous consumption Task failed, first consume the existing comsumption_queue
if not self.consumption_queue:
@@ -219,7 +219,7 @@ class WatchChannel(ABC):
await self.webhook.send(content=content, username=username, avatar_url=avatar_url, embed=embed)
except discord.HTTPException as exc:
self.log.exception(
- f"Failed to send message to {self.__class__.__name__} webhook",
+ f"Failed to send a message to the webhook",
exc_info=exc
)
@@ -265,7 +265,7 @@ class WatchChannel(ABC):
)
except discord.HTTPException as exc:
self.log.exception(
- f"Failed to send an attachment to {self.__class__.__name__} webhook",
+ f"Failed to send an attachment to the webhook",
exc_info=exc
)
@@ -341,13 +341,13 @@ class WatchChannel(ABC):
def cog_unload(self) -> None:
"""Takes care of unloading the cog and canceling the consumption task."""
- self.log.trace(f"Unloading {self.__class__._name__} cog")
+ self.log.trace(f"Unloading the cog")
if not self._consume_task.done():
self._consume_task.cancel()
try:
self._consume_task.result()
except asyncio.CancelledError as e:
self.log.exception(
- f"The {self.__class__._name__} consume task was canceled. Messages may be lost.",
+ f"The consume task was canceled. Messages may be lost.",
exc_info=e
)