Skip to content

Commit

Permalink
chore: Remove unused captcha utility code
Browse files Browse the repository at this point in the history
  • Loading branch information
rtk-rnjn committed May 28, 2024
1 parent 0a09667 commit 38bd97e
Show file tree
Hide file tree
Showing 18 changed files with 6 additions and 540 deletions.
12 changes: 5 additions & 7 deletions core/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def callback(self, interaction: discord.Interaction):
if value == "__index":
await self.view.rebind(FrontPageSource(self.bot), interaction)
else:
cog: Cog = self.bot.get_cog(value)
cog: Cog = self.bot.get_cog(value) # type: ignore
if cog is None:
await interaction.response.send_message("Somehow this category does not exist?", ephemeral=True)
return
Expand Down Expand Up @@ -286,12 +286,10 @@ def key(command: commands.Command) -> str:
if not self.__all_commands:
entries = bot.cogs
all_commands: dict[Cog, list[commands.Command]] = {}
for real_cog in entries:
cog: Cog = bot.get_cog(real_cog)
if cog:
_cmds = [c for c in cog.get_commands() if not c.hidden]
if cog is not None and _cmds:
all_commands[cog] = self.__get_all_commands(cog)
for _, cog in entries.items():
_cmds = [c for c in cog.get_commands() if not c.hidden]
if cog is not None and _cmds:
all_commands[cog] = self.__get_all_commands(cog)

self.__all_commands = all_commands

Expand Down
2 changes: 1 addition & 1 deletion events/on_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ async def __internal_snippets_parser():
await asyncio.gather(*AWAITABLES, return_exceptions=False)

async def _global_chat_handler(self, message: discord.Message) -> None:
if not message.content:
if not message.content or message.author.bot:
return

if not hasattr(message.author, "guild"):
Expand Down
5 changes: 0 additions & 5 deletions utilities/captcha/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions utilities/captcha/__init__.py

This file was deleted.

268 changes: 0 additions & 268 deletions utilities/captcha/audio.py

This file was deleted.

Binary file removed utilities/captcha/data/0/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/1/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/2/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/3/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/4/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/5/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/6/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/7/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/8/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/9/default.wav
Binary file not shown.
Binary file removed utilities/captcha/data/DroidSansMono.ttf
Binary file not shown.
Binary file removed utilities/captcha/data/beep.wav
Binary file not shown.
Loading

0 comments on commit 38bd97e

Please sign in to comment.