Skip to content
Merged

fix #361

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
11 changes: 10 additions & 1 deletion src/kernelbot/cogs/admin_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _leaderboard_opening_message(
):
return f"""
# New Leaderboard: {leaderboard_name}\n
**Deadline**: {deadline.strftime('%Y-%m-%d %H:%M')}\n
**Deadline**: {deadline.strftime("%Y-%m-%d %H:%M")}\n
{description}\n
Submit your entries using `/leaderboard submit ranked` in the submissions channel.\n
Good luck to all participants! 🚀 <@&{self.bot.leaderboard_participant_role_id}>"""
Expand Down Expand Up @@ -824,6 +824,15 @@ async def get_submission_by_id(
interaction: discord.Interaction,
submission_id: int,
):
is_admin = await self.admin_check(interaction)
if not is_admin:
await send_discord_message(
interaction,
"You need to have Admin permissions to run this command",
ephemeral=True,
)
return

with self.bot.leaderboard_db as db:
sub: SubmissionItem = db.get_submission_by_id(submission_id)

Expand Down
Loading