Bosen
Bosen

Reputation: 139

Python Bot Commands total count

How to add a code which tracks all commands total counts from all servers bot has been installed. example for below command i need counts how many time this command has been used in all server and from all user.

@bot.command(pass_context=True)
async def first(ctx):
     await bot.say("Hello {}".format(ctx.message.author.mention))

.

final result this Command has been used xx times from users all servers.

Upvotes: 1

Views: 1139

Answers (1)

Gaming with Akashdeep
Gaming with Akashdeep

Reputation: 93

Well why not make a database of like sqlite?? or even use json to store , like in json you can store something like {"command1":1,"command2":2} and then in end of each code it adds a json.load attribute to import the file and update it , Easy

Upvotes: 1

Related Questions