Skip to content

Commit

Permalink
[ThreadOpener] fix
Browse files Browse the repository at this point in the history
  • Loading branch information
japandotorg committed Oct 13, 2023
1 parent 0322f31 commit ed4d7db
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions threadopener/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ async def _toggle(self, ctx: commands.Context, toggle: bool):
"""
Toggle ThreadOpener enable or disable.
"""
if "THREADS_ENABLED" not in ctx.guild.features: # type: ignore
await ctx.send("Threads are not enabled in this server.")
return
await self.config.guild(ctx.guild).toggle.set(toggle) # type: ignore
await ctx.send(f"Thread opener is now {'enabled' if toggle else 'disabled'}.")

Expand Down
6 changes: 0 additions & 6 deletions threadopener/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@ async def on_message(self, message: discord.Message) -> None:
f"ThreadOpener has been disabled due to missing permissions in {message.guild.name}.",
)
return
if "THREADS_ENABLED" not in message.guild.features:
await self.config.guild(message.guild).toggle.set(False)
log.info(
f"ThreadOpener has been disabled due to missing threads channel feature in {message.guild.name}.",
)
return

bucket = self.spam_control.get_bucket(message)
current = message.created_at.timestamp()
Expand Down

0 comments on commit ed4d7db

Please sign in to comment.