haxball / haxball-issues

115 stars 43 forks source link

Problems with HaxBall public bot code || Проблемы с ХаксБол приватным ботом (код #1743

Open Dexteress opened 1 year ago

Dexteress commented 1 year ago

/ VARIABLES /

/ ROOM /

const roomName = 'Public Room'; const maxPlayers = 12; const roomPublic = true; const token = ""; // Insert token here

var roomWebhook = ' '; // this webhook is used to send the details of the room (chat, join, leave) ; it should be in a private discord channel var gameWebhook = ' '; // this webhook is used to send the summary of the games ; it should be in a public discord channel var fetchRecordingVariable = true; var timeLimit = 3; var scoreLimit = 3; ... ... ...


So, I use this code, but i have problem with "Var roomWebhook" and "var gameWebhook". Pls help, What must i Do with this? What discord channel I should use? Where i can find "this webhook" to insert instead ' ' ? I would be very grateful if you could help me.

Dexteress commented 1 year ago

Вообщем я нашел ответ, нужно создать свой дискорд ссылку, а дальше скопировать путь к дискорд каналу.

diegotodur commented 1 year ago

Hello! In order to create a WebHook there are 2 ways:

1) Go to the Discord server configuration and enter the Integrations menu, select create Webhook (You must define the channel and the name of the title with which the messages will be sent if you do not define it in your script) and copy the link generated.

2) Right click on any channel and in edit select integrations, follow the same steps above and you will get your link.

Now it is enough to place the link in the Webhook variable and it will already be integrated, the link shown is like this:

https://discord.com/api/webhooks/-------/----------------

image