gabrielbrunop / haxball-server

A small server utility for Haxball
20 stars 4 forks source link

Help #3

Closed EmirhanOlgn closed 2 years ago

EmirhanOlgn commented 2 years ago

@gabrielbrop Hello again. I think I more or less understood the use of the bot, but I still don't know how to create the bot.

"bots": [
    { "name": "example1", "displayName": "Example room 1", "path": "path/to/example1.js" },
    { "name": "example2", "displayName": "Example room 2", "path": "path/to/example2.js" }
],

I don't know what to write inside the javascript folder shown. Can you open a sample usage project and show some features? for example: room.sendAnnouncement

And I am getting an error like this:

Unable to open the room!
Error: Failed to launch the browser process! spawn your/path/to/chrome.exe ENOENT

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

https://github.com/gabrielbrop/haxball-server/issues/2

rocosttaa commented 2 years ago

I am not the creator of this, but you can only do this if you want:

 "panel": {
         "bots": [
             {
                 "name": "futsal",
                 "path": "path/to/example1.js"
             }
         ],

But it seems that the error is not related to this, but to the execPath. Mine for example is "execPath": "/usr/bin/chromium-browser", Maybe it's wrong for you there.

EmirhanOlgn commented 2 years ago

Hello, thanks for the help. Another thing I can't do is I don't know how to make the file with the bot. Can you help me?

example1.js
rocosttaa commented 2 years ago

Mine, for example, is answering:

image

EmirhanOlgn commented 2 years ago

This is not what I'm talking about. I don't know how to write the codes inside the file. require, room. and room settings. @rocosttaa