File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ __pycache__
77.pytest_cache
88.coverage
99.hypothesis
10- .venv /
10+ .venv /
Original file line number Diff line number Diff 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 "" ,
You can’t perform that action at this time.
0 commit comments