GravityWolfNotAmused / PlayerCountDiscordBot

A simple discord bot that updates their status' to show player counts.
MIT License
36 stars 16 forks source link

[BUG] #7

Closed davmc214 closed 3 years ago

davmc214 commented 3 years ago

After editing the config and starting the bot, it only shows "Playing Starting Bot watching:127.0.0.1:11111"

I have a random IP in the status here just for reference.

GravityWolfNotAmused commented 3 years ago

Random IP? How often does this refresh?

davmc214 commented 3 years ago

Static IP, with a 30 second refresh. When I said random IP, I meant I just put that IP in the quotes instead of the actual server IP to not advertise on here.

davmc214 commented 3 years ago

Disregard. I had the query port as 20716 instead of 27016.

GravityWolfNotAmused commented 3 years ago

Are you using main branch, or the PR from #6?

davmc214 commented 3 years ago

Main branch. Release 1.0.4

GravityWolfNotAmused commented 3 years ago

Thanks for reporting, glad it wasn't an issue, but let me know if you have any issues.

davmc214 commented 3 years ago

No problem. Sorry to bother you with my mistake. I do like this bot as it's simple and lightweight. Much better than others I have tried.

GravityWolfNotAmused commented 3 years ago

Thank you, friend. Just let me know if I can make it better, or fix anything. Best wishes.

davmc214 commented 3 years ago

One thing I would like to point out is that you don't need a separate instance running for additional servers. Just add a comma after the ] under server information and add the second server into it.

GravityWolfNotAmused commented 3 years ago

Can you give me a better example with json?

davmc214 commented 3 years ago

{ "_serverInformation": [ { "botName": "Chernarus", "botAddress": "54.39.28.84:27016", "discordBotToken": "" }, { "botName": "Namalsk", "botAddress": "54.39.28.84:27019", "discordBotToken": "" }, { "botName": "Chernarus", "botAddress": "54.39.28.84:27017", "discordBotToken": "" } ], "_updateTime": 30, "_steamAPIKey": "", "_isDebug": false, "_userConfigNameAsLabel": false }

davmc214 commented 3 years ago

That's my exact code and all 3 report just fine

GravityWolfNotAmused commented 3 years ago

Remove API key, and discord token

GravityWolfNotAmused commented 3 years ago

So, are you saying you want to put one in, give a number and it does the ports after the first?

davmc214 commented 3 years ago

Nice catch. I didn't even think of it. I'm used to sharing among friends not publicly.

GravityWolfNotAmused commented 3 years ago

You probably invalidated your discord tokens since discord can see that.

davmc214 commented 3 years ago

Basically, for each one, put the proper information in for the name, IP, port, and discord token. You'll have to create a discord bot for each as normal, but one bot running for all servers.

davmc214 commented 3 years ago

I'll see what happens with the bots. If they are invalidated, then I can create new ones for it.

GravityWolfNotAmused commented 3 years ago

You just have to get the new keys from the dev portal.

GravityWolfNotAmused commented 3 years ago

But what do you want the bot to do?

davmc214 commented 3 years ago

Ok. I'm fairly new to discord bots so thanks for that info that it will regenerate. That is what I meant about seeing what happens with the bots, meaning the discord bot. Your bot is working just fine. I remember seeing somewhere that you mentioned you have to create a new folder for each server and thought this might be easier for people to get up and running.

GravityWolfNotAmused commented 3 years ago

New folders? No, it's just additional servers. Where did you see this?

davmc214 commented 3 years ago

In the comments of this video. https://www.youtube.com/watch?v=wBOa834FKoc

GravityWolfNotAmused commented 3 years ago

Idk where I said that there, but all that's needed to add more dayz servers is to add to the config.

davmc214 commented 3 years ago

I assumed that was you in the video and replying to the comments. Sorry for the misunderstanding. I know I had tried another bot and attempted adding a server the same way, but it wouldn't run like that. So I tried a second folder and they kept crashing. That's when I found yours.

GravityWolfNotAmused commented 3 years ago

Not my video, but is my bot. I'm GravityWolf everywhere.