Using separate command to count another command's usage

Asked Sep 8, 2022·2 replies·Last activity 3 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I currently have a command that whenever someone types it it gets back to them with a message, but i want to have another command count the amount of times that command has been used. Is there a way to do that?

2 replies

Hey @Steady Dragon!

It depends on whether you want to mask the amount of time the command has been used and then be able to check it through the dashboard, or if you want to display it within the command's response; but you won't be able to have a separate command to display that data.

First option, hide the counter and check it through the dashboard:

!addcom !commandName $(eval '$(count)'; 'YOUR_MESSAGE';)

Second option, display the counter within the response:

!addcom !commandName YOUR_MESSAGE. | This command has been used $(count) times.

I was mostly curious if i could display the data with a separate command. But since that's not possible I'll just stick with displaying the counter within the response.
Thank you so much!