Add little logging

This commit is contained in:
Johannes Rothe 2021-12-29 02:12:33 +01:00
parent 0be8b9039f
commit def27a184d

View File

@ -9,6 +9,7 @@ bot = commands.Bot(command_prefix="!")
@bot.command() @bot.command()
async def checkin(context: commands.Context) -> None: async def checkin(context: commands.Context) -> None:
print(f"{context.message.author.display_name} checked in")
checkin_db.auto_checkout() checkin_db.auto_checkout()
checkin_db.update(context.message.author.display_name, True) checkin_db.update(context.message.author.display_name, True)
count = checkin_db.get_checkin_count() count = checkin_db.get_checkin_count()
@ -20,6 +21,7 @@ async def checkin(context: commands.Context) -> None:
@bot.command() @bot.command()
async def checkout(context: commands.Context) -> None: async def checkout(context: commands.Context) -> None:
print(f"{context.message.author.display_name} checked out")
checkin_db.update(context.message.author.display_name, False) checkin_db.update(context.message.author.display_name, False)
count = checkin_db.get_checkin_count() count = checkin_db.get_checkin_count()
if count == 1: if count == 1: