Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/sr/discord_bot/commands/passwd.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ async def passwd(
message = '\n'.join([f"**{team}:** {password}" for team, password in passwords])
await interaction.response.send_message(message, ephemeral=True)
else:
tla = tla.upper()
if new_password is not None:
if isinstance(interaction.user, discord.Member) and not interaction.user.guild_permissions.administrator:
await interaction.response.send_message(
Expand All @@ -35,7 +36,7 @@ async def passwd(
)
return
interaction.client.set_password(tla, new_password)
await interaction.response.send_message(f"The password for {tla.upper()} has been changed.", ephemeral=True)
await interaction.response.send_message(f"The password for {tla} has been changed.", ephemeral=True)
else:
password = interaction.client.passwords[tla]
await interaction.response.send_message(f"The password for {tla.upper()} is `{password}`", ephemeral=True)
await interaction.response.send_message(f"The password for {tla} is `{password}`", ephemeral=True)
Loading