Added command logging

This commit is contained in:
Daniel Skýpala 2023-03-30 15:55:24 +02:00
parent aad869cd5f
commit 2b8d0a6b15

View file

@ -22,4 +22,8 @@ cogs_list = [
for cog in cogs_list: for cog in cogs_list:
bot.load_extension(f'cogs.{cog}') bot.load_extension(f'cogs.{cog}')
@bot.listen('on_interaction')
async def statistics(interaction):
logger.info(f"{interaction.user} ({interaction.user.id}) used command {interaction.data['name']}.")
bot.run(CONFIG["token"]) bot.run(CONFIG["token"])