Command setup help needed


#1

PhantomBot Version: 2.3.7
OS Version: Centos 7
Java Version: 1.8
Browser and Version (for Panel Support): Chrome
Stock PhantomBot: Yes

Let us know what help you need: I used to use Nightbot and had these commands here:
!wins
!tournament

To edit these command i used !editwins and !edittournament. Then i could just do !editwins 1 and the wins command would change to “… has 1 win today!”, same with tournament but then with a link. I want to set this up in Phantombot aswell but can figure out how…

Every tip would be nice, thanks already :)!


#2

The only way to do this would be to use the (readfile) and (writetofile) command tags.

!addcom !command I won (readfile wins.txt) today!

!addcom !setcommand Wins set to (1)! (writefile wins.txt, false, (1))


#3

Do i need to create wins.txt for that and where do i need to put that .txt file?


#4

The bot only reads files from the addons folder. You can create it if you want or it might throw an error that the file is missing.


#5

Create a file wins.txt in addons but got this in the twitch chat

Sorry for the nightbot, gonna delete him after this works :stuck_out_tongue:


#7

Sorry that’s by bad. Change writetofile to writefile.

!addcom !setcommand Wins set to (1)! (writefile wins.txt, false, (1))


#8

Thanks for helping me out :slight_smile:! Works fine now, only need to fix my VPS now. For some reason it keeps shutting down Phantonbot…


#9

By shutting down, do you mean it stops responding to commands after the chat is inactive for a few minutes?


#10

Well, yes. And the webpanel doesnt restarts. And in the panel it says its reconnecting. When i start Putty and login i see that the status of phantombot is Activating. Is that normal that it stops when stream isnt live? And goes back on when stream is?


#11

That’s something to do with your hosting provider. Please read this topic on how to solve this: Bot Becoming Unresponsive


#12

Thanks again, you rock :)!


#13

Do you also know how to make this in Phantombot:


#14

Read Command Variables for subscriber counts.

Go to https://phantombot.tv/commands/ and search for ‘cooldown’

You may also look over the Control Panel, look at the Commands > Cooldown tab.


#15

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