aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-07-09 23:28:49 +0100
committerGravatar Chris Lovering <[email protected]>2022-07-09 23:28:49 +0100
commit9e3b819a22a35196a3162ad21957fb1091512527 (patch)
treea6c3b1a41a536510ad9b6d22420fccbad88bc587
parentAdd github cache to flake8 ignore list (diff)
Remove superfluous guards
-rw-r--r--metricity/exts/event_listeners/_utils.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/metricity/exts/event_listeners/_utils.py b/metricity/exts/event_listeners/_utils.py
index 4de01fd..f0bbe39 100644
--- a/metricity/exts/event_listeners/_utils.py
+++ b/metricity/exts/event_listeners/_utils.py
@@ -21,10 +21,6 @@ async def sync_message(message: discord.Message, from_thread: bool) -> None:
if await models.Message.get(str(message.id)):
return
- if from_thread and not message.channel.parent:
- # This is a forum channel, not currently supported by Discord.py. Ignore it.
- return
-
args = {
"id": str(message.id),
"channel_id": str(message.channel.id),
@@ -36,7 +32,5 @@ async def sync_message(message: discord.Message, from_thread: bool) -> None:
thread = message.channel
args["channel_id"] = str(thread.parent_id)
args["thread_id"] = str(thread.id)
- if not await models.Thread.get(str(thread.id)):
- await insert_thread(thread)
await models.Message.create(**args)