Command: Chat count

Hello everybody,

I need to create a command which can respond me how many message has one person-

Something like this: !message KelthozT1

Then, the Nightbot say to me: “KelthozT1 has 23 message in this chat”

Is it possible? If yes, how I can do it?

Have a nice day! :smiley:


Click this link. It will generate three links and two tokens, a public token (8 characters long) and a private token (16 characters long). The public token is located within the first generated link. The private token is located within both the second and third generated links. The tokens are found after token= and before &data=$(querystring) Copy them down and keep them somewhere safe!

I have set up 2 commands below, !message and _!message which work together to increase a specified user’s message count (only !message is meant to be used directly). Copy and paste the command setups into chat one by one to add the commands. Replace PUBLIC_TOKEN with your public token and PRIVATE_TOKEN with your private token.

!addcom -cd=5 !message -a=_!message $(eval a=decodeURIComponent(`$(querystring)`);`PRIVATE_TOKEN`+(a?`&data=~${encodeURIComponent(a)}~`:``))

!addcom -cd=5 _!message $(eval d=decodeURIComponent;a=`$(urlfetch$(query))`;b=d(`$(querystring)`);b.includes(`PRIVATE_TOKEN`)?(u=d(b.split(`&data=`)[1]),c=`$(urlfetch json`.match(RegExp(u,`gi`)),a.includes(`Successfully added entry`)?`${u.slice(1,u.length-1)} has ${c.length} message${c.length>1?`s`:``} in this chat.`:`Enter a user to message!`):` `)

!message [user]

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.