[REQ]Autorelaod bot , !reload !restart command

please create !reload or !restart for bot

Any reason why you would want this?

I have some reason for this. The bot regularly stops sending stream and clip alerts to discord. Sometimes it can send alerts for many days in a row without reboots, but sometimes it can’t hold out even for a few hours. I have several bots that have to be reloaded several times a day on a remote VDS. This is a very unpleasant work. So I endorse such request.

1 Like

I’d rather properly fix this, when the bot stops sending messages to Discord, are you seeing it trying to send something in the console?

No messages or errors related to it in the console, just silence.

Can’t you modify the run scripts so if it exits it just restarts?

I know for a fact you can do it with windows .bat files.

I meant like, when you type a command do you see the normal [DISCORD] [#channel] [CHAT] message here response in the console?

today bot dont detecd livestream by 4 hours after 4,5 hours i kill bot and start again and bot started worked again (he detect livestream and starting showing numbers of viewers)

I see all users messages and bot responses from discord channels in console.
Like this:
[DISCORD] [#test] Me: !addcom viewers (embed 255 255 255, Viewers in our Twitch now: (viewers))
[DISCORD] [#test] [CHAT] <@!333291570397864513>, Command !viewers has been added!
[DISCORD] [#test] Me: !viewers
[DISCORD] [#test] [EMBED] Viewers in our Twitch now: 27

Sorry if I still don’t understand you properly.

I added error logging for the methods sending messages, hopefully next release it will catch something once you experience this issue.

1 Like

I have the same issue on a regular basis. Also, sometimes the uptime is not reset after the end of the stream and continue to count for many days if you do not restart the bot. The same is !playtime. A restart of the bot is my daily routine.

This happens when Twitch’s API bugs out or when you shutdown the bot mid stream. I’ll see if I can’t push a fix for it.

1 Like

i dont restart bot feew deys (i dont stream in this time) i must restart becose bot dont detect livestream after restart bot starting detect livstream instantly and viewers in dashboard.

Support! If you change something in the config for example dont want to have to go into my console and type out the code to restart it. Also if theres a issue sometimes restarting fixes things…

1 Like

If you’re on windows consider replacing your launch.bat with this:

@echo off
setlocal enableextensions enabledelayedexpansion
set first=1
for /f "delims=" %%a in ("%comspec%") do set "compath=%%~DPa"
PATH %PATH%;%compath%;%JAVA_HOME%\bin\
WHERE java >nul 2>nul
    echo You must have Java installed, please install it from: https://java.com/download
java -Dinteractive -Dfile.encoding=UTF-8 -jar PhantomBot.jar %1
GOTO runprogram

This will force the batch file to restart the bot when the java program terminates.

i use windows task scheduler to restart the batch file every 4 hours i just added killtask java.exe at the top of launch.bat, works flawless