Skip to content

Commit

Permalink
Make backend_info admin only
Browse files Browse the repository at this point in the history
  • Loading branch information
someyuck committed Apr 13, 2024
1 parent 79e91ec commit de55765
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions bot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,20 @@ async def verify_user(ctx):
@bot.command(name="backend_info")
async def backend_info(ctx):
"""For debugging server info; sends details of the server."""
uname = platform.uname()
await ctx.send(
f"Here are the server details:\n"
f"system: {uname.system}\n"
f"node: {uname.node}\n"
f"release: {uname.release}\n"
f"version: {uname.version}\n"
f"machine: {uname.machine}"
)

authorID = str(ctx.message.author.id)
if is_bot_admin(authorID):
uname = platform.uname()
await ctx.send(
f"Here are the server details:\n"
f"system: {uname.system}\n"
f"node: {uname.node}\n"
f"release: {uname.release}\n"
f"version: {uname.version}\n"
f"machine: {uname.machine}"
)
else:
await ctx.reply(f"{authorID} is not a bot admin.")


def is_academic(ctx: commands.Context):
Expand Down

0 comments on commit de55765

Please sign in to comment.