Skip to content

Commit 6665deb

Browse files
committed
Add newline to gitignore and fix Whois check
1 parent 4b7e72c commit 6665deb

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ __pycache__
77
.pytest_cache
88
.coverage
99
.hypothesis
10-
.venv/
10+
.venv/

techsupport_bot/commands/who.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ async def is_reader(interaction: discord.Interaction) -> bool:
8787

8888
raise commands.CommandError(message)
8989

90-
@app_commands.check(is_reader)
9190
@app_commands.command(
9291
name="whois",
9392
description="Gets Discord user information",
@@ -103,6 +102,12 @@ async def get_note_command(
103102
self, interaction: discord.Interaction, user: discord.Member
104103
) -> None:
105104
"""Method to get notes assigned to a user."""
105+
# Check if user is a note reader
106+
if not await self.is_reader(interaction):
107+
embed = auxiliary.prepare_deny_embed(message="You cannot run whois")
108+
await interaction.response.send_message(embed=embed, ephemeral=True)
109+
return
110+
106111
embed = discord.Embed(
107112
title=f"User info for `{user}`",
108113
description="**Note: this is a bot account!**" if user.bot else "",

0 commit comments

Comments
 (0)