Skip to content

Commit

Permalink
Merge pull request #241 from SylteA/dev
Browse files Browse the repository at this point in the history
Nicer message
  • Loading branch information
SylteA authored Oct 23, 2023
2 parents a8e7c35 + 328c845 commit e2a96a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bot/extensions/levelling/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,12 @@ async def rank(self, interaction: core.InteractionType, member: discord.Member =
log.info(record)

if record.total_xp is None:
return await interaction.response.send_message("User not ranked yet!", ephemeral=True)
if member.id == interaction.user.id:
return await interaction.response.send_message(
"You are not ranked yet, send a few messages and try again!", ephemeral=True
)

return await interaction.response.send_message("That user is not ranked yet...", ephemeral=True)

# Fetch the user's avatar as bytes
avatar_bytes = await member.avatar.with_format("png").read()
Expand Down

0 comments on commit e2a96a5

Please sign in to comment.