Skip to content

Commit

Permalink
[ThreadOpener] add disable warning
Browse files Browse the repository at this point in the history
  • Loading branch information
japandotorg committed Oct 13, 2023
1 parent b80f33c commit caea29d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions threadopener/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ async def on_message(self, message: discord.Message) -> None:
or not message.guild.me.guild_permissions.create_public_threads
):
await self.config.guild(message.guild).toggle.set(False)
await message.channel.send(
"ThreadOpener has been disabled due to missing permissions in "
f"{message.channel.name} ({message.channel.id})"
)
log.info(
f"ThreadOpener has been disabled due to missing permissions in {message.guild.name}.",
)
Expand Down

0 comments on commit caea29d

Please sign in to comment.