KOOKIIEStudios / PalCON-Discord

A Python-based Discord bot for PalWorld server administration via RCON
MIT License
18 stars 3 forks source link

Cannot start bot #7

Closed ShadyGame closed 7 months ago

ShadyGame commented 7 months ago

Hi,

Im on Windows when i start the bot no matter what option do i chose it just closes itself?

It has to run in the same machine as the server?

Regards

Bratah123 commented 7 months ago

Is there any errors that you get before or why it closes?

Did you follow all the steps of environment setup

It has to run in the same machine as the server? It does not, so long as you have RCON setup on your pal world server (docs soon) and you have the rcon port (25575) port forwarded, you can connect from any machine

ShadyGame commented 7 months ago

What does it mean to SET IT TO PATH DURING INSTALLATION? sorry :\

Also i created the bot and added it to my discord server but i cannot see it there

Bratah123 commented 7 months ago

What does it mean to SET IT TO PATH DURING INSTALLATION? sorry :\

No worries, when you first install python it will ask you for some configurations, one of them is adding it to your PATH. Which lets you run python in a console.

When you install python you should have these configurations:

image

Also i created the bot and added it to my discord server but i cannot see it there

I don't really know what you mean by this

KOOKIIEStudios commented 7 months ago

Can you try running from command line and letting us know the result?

ShadyGame commented 7 months ago

Okay yes i have done that @Bratah123 , thanks for the clear instructions

@KOOKIIEStudios

You have selected A: Virtual Python Environment Traceback (most recent call last): File "C:\Users\x\Documents\PalCON-Discord\main.py", line 3, in import discord ModuleNotFoundError: No module named 'discord' PS C:\Users\Lil_G\Documents\PalCON-Discord>

KOOKIIEStudios commented 7 months ago

Strange. The start script should automatically deal with it

Well, another user resolved it this way: https://github.com/KOOKIIEStudios/PalCON-Discord/issues/3#issuecomment-1920528217

BloodDragon2580 commented 7 months ago

I have the same error on windows 2019.

KOOKIIEStudios commented 7 months ago

Our test benches are win11 using pwsh 7 And our production server is on Ubuntu Jammy

Icyww

KOOKIIEStudios commented 7 months ago

I have the same error on windows 2019.

Have you tried out the sequence outlined in #3?

ShadyGame commented 7 months ago

It worked. but only with Global Python enviroment B

Can anyone use the discord commands or just admin? anyway to change that, i wanted to let player use atleast the /online command

Also a message in the chat informing who joined or left the server would be nice

And set automated messages ingame chat , hope you consider ;D

also when i try /online this is happening

2024-02-01 20:25:12,718 - main - INFO - Bot is online! 2024-02-01 20:25:17,217 - client - INFO - Setting up RCON connection 2024-02-01 20:25:17,217 - client - DEBUG - Fetching online players 2024-02-01 20:25:17,328 - main - ERROR - Unable to fetch/send metadata of connected players: list index out of range 2024-02-01 20:30:25,634 - client - INFO - Setting up RCON connection 2024-02-01 20:30:25,635 - client - DEBUG - Fetching online players 2024-02-01 20:30:25,741 - main - ERROR - Unable to fetch/send metadata of connected players: list index out of range

It was working before

Bratah123 commented 7 months ago

Also a message in the chat informing who joined or left the server would be nice

And set automated messages ingame chat , hope you consider ;D

Sure! preferably if you could open another Issue post for this in the form of a feature request, we would love to look at it.

Can anyone use the discord commands or just admin? anyway to change that, i wanted to let player use atleast the /online command

the /info and /online command anyone can use, every other command is admin only (I.E. shutdown, kick, etc..)

For the problem you're having now, we will try to fix it in this issue: https://github.com/KOOKIIEStudios/PalCON-Discord/issues/9

Glad it worked, I will close this issue as the original problem has been fixed, Thanks!!!

@ShadyGame

BloodDragon2580 commented 7 months ago

It worked now with Global Python enviroment B