0

I just have a question. Is there some way to program a discord Bot in python, which is starting a server (On a website (Ploudos)) on a command like !Start-Server or something? I dont have any code yet, im just interested if there is a way. Thank you.

Yami.Code
  • 21
  • 5

2 Answers2

1

Yes, since ploudus doesnt have a api you can use to start the server. Create selenium script to crawl through the website and start the server, then link to a discord command...

Hope this is what youre after, this method works for automating anything on the web through python.

Hazzah
  • 85
  • 6
  • Is this simple? I'm not very very very good at python, just didn't find any tutorial on YouTube for that. Could you tell me what a Selenium Script is? – Yami.Code Jun 15 '21 at 20:42
0

Well, if you have a bat file to start your server, I guess you can do this, the following bat code will keep your server open if it crashes:

@echo off
cls
title Server name
:StartServer
start /wait java -Xmx2048M -Xms2048M -jar server.jar -o true -nogui
echo Server closed/crashed... restarting!
goto StartServer

If you don't want it to auro-restart you can just do

@echo off
java -Xmx2048M -Xms2048M -jar server.jar -o true -nogui

Note that bat files only work on windows, that way you will have access to the console, anyways, to only execute the server jar, you can use this.

xDec0de_
  • 21
  • 1
  • 6