aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-02-18 14:39:19 +0000
committerGravatar GitHub <[email protected]>2022-02-18 14:39:19 +0000
commit9bae829f91c00f89fd1e725036f4d24ec796410b (patch)
tree1f12d74ebcbaed5ac7e41cbff076cdfba5904d57
parentMerge pull request #2096 from minalike/enhancement/uid-mod-alert (diff)
parentMerge branch 'main' into fix-bot-2004 (diff)
Merge pull request #2097 from python-discord/fix-bot-2004
Remove auto joining of new threads.
-rw-r--r--bot/exts/utils/bot.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/bot/exts/utils/bot.py b/bot/exts/utils/bot.py
index 788692777..8f0094bc9 100644
--- a/bot/exts/utils/bot.py
+++ b/bot/exts/utils/bot.py
@@ -1,7 +1,6 @@
-from contextlib import suppress
from typing import Optional
-from discord import Embed, Forbidden, TextChannel, Thread
+from discord import Embed, TextChannel
from discord.ext.commands import Cog, Context, command, group, has_any_role
from bot.bot import Bot
@@ -17,20 +16,6 @@ class BotCog(Cog, name="Bot"):
def __init__(self, bot: Bot):
self.bot = bot
- @Cog.listener()
- async def on_thread_join(self, thread: Thread) -> None:
- """
- Try to join newly created threads.
-
- Despite the event name being misleading, this is dispatched when new threads are created.
- """
- if thread.me:
- # We have already joined this thread
- return
-
- with suppress(Forbidden):
- await thread.join()
-
@group(invoke_without_command=True, name="bot", hidden=True)
async def botinfo_group(self, ctx: Context) -> None:
"""Bot informational commands."""