Skip to content

Commit a6b861f

Browse files
author
Mark Saroufim
authored
fix (#361)
1 parent c613971 commit a6b861f

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/kernelbot/cogs/admin_cog.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def _leaderboard_opening_message(
233233
):
234234
return f"""
235235
# New Leaderboard: {leaderboard_name}\n
236-
**Deadline**: {deadline.strftime('%Y-%m-%d %H:%M')}\n
236+
**Deadline**: {deadline.strftime("%Y-%m-%d %H:%M")}\n
237237
{description}\n
238238
Submit your entries using `/leaderboard submit ranked` in the submissions channel.\n
239239
Good luck to all participants! 🚀 <@&{self.bot.leaderboard_participant_role_id}>"""
@@ -824,6 +824,15 @@ async def get_submission_by_id(
824824
interaction: discord.Interaction,
825825
submission_id: int,
826826
):
827+
is_admin = await self.admin_check(interaction)
828+
if not is_admin:
829+
await send_discord_message(
830+
interaction,
831+
"You need to have Admin permissions to run this command",
832+
ephemeral=True,
833+
)
834+
return
835+
827836
with self.bot.leaderboard_db as db:
828837
sub: SubmissionItem = db.get_submission_by_id(submission_id)
829838

0 commit comments

Comments
 (0)