bot: Add some logs
All checks were successful
Build Docker / Build Docker (push) Successful in 18s

This commit is contained in:
Nathan Woodburn 2023-08-11 16:44:24 +10:00
parent 6fa7545c57
commit 756374d5f7
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

3
bot.py
View File

@ -17,11 +17,13 @@ statusType="watching"
# Commands
@tree.command(name="ping", description="Check bot connection")
async def ping(ctx):
print("Ping")
await ctx.response.send_message("Pong!",ephemeral=True)
@tree.command(name="shortlink", description="Shorten a link")
async def shortlink(ctx, link: str, name: str = None):
if (ctx.user.id != 892672018917519370):
print("User: " + str(ctx.user.id) + " tried to use the link command")
await ctx.response.send_message("You don't have permission to use this command",ephemeral=True)
else:
APIKEY=os.getenv('LINK_API_KEY')
@ -41,6 +43,7 @@ async def shortlink(ctx, link: str, name: str = None):
@tree.command(name="botstatus", description="Set the bot status")
async def botstatus(ctx, message: str, statusmethod: str = None):
if (ctx.user.id != 892672018917519370):
print("User: " + str(ctx.user.id) + " tried to use the botstatus command")
await ctx.response.send_message("You don't have permission to use this command",ephemeral=True)
else:
global activityMessage