Add command stats call to on_command

pull/70/head
Stijn De Clercq 2020-11-04 10:02:26 +01:00
parent 97f6aa105d
commit 119d7c8dca
2 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import discord
from discord.ext import commands
from functions import checks, easterEggResponses
from functions.database import stats, muttn, custom_commands
from functions import commands as command_stats
import pytz
import time
import traceback
@ -95,6 +96,7 @@ class Events(commands.Cog):
print("{} in {}: {}".format(ctx.author.display_name,
"DM" if DM else "{} ({})".format(ctx.channel.name, ctx.guild.name),
ctx.message.content))
command_stats.updateFile(ctx)
@commands.Cog.listener()
async def on_command_error(self, ctx, err):

View File

@ -0,0 +1,7 @@
from discord.ext import commands
def updateFile(ctx: commands.Context):
prefix_used = ctx.prefix
command: commands.Command = ctx.command
pass