How to create a command with 2 different counters?

Asked Mar 13, 2024·2 replies·Last activity 2 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.

Estoy intentando crear un comando que mantenga la cuenta de los duelos que se dan entre dos personas en el chat actualmente el comando está asi:
$(eval var q = "$(query)".replace(/^@/g, '').toLowerCase(); var contador1 = $(count); var contador2 = $(count); if (q === "unbanc0") { contador1++; "El recuento actual es unbanc0 " + contador1 + " - " + contador2 + " Thomma"; } else if (q === "thomma") { contador2++; "El recuento actual es unbanc0 " + contador1 + " - " + contador2 + " Thomma"; } else { "Quien ganó? unbanc0 o Thomma"; })
The problem is that both counters are always incremented, any idea how to solve it?

2 replies

unfortunately nightbot doesn't have a good memory, can only remember one count per command, so the only way to do it in a single command (yes it can be done) is to have somewhere else to store the info... some sort of api that can accept and remember the info for u