[Release] D2FiveM - Control your FXServer with Discord

Yeah same thing for me but most of which still works

I came a bit further, now the bot itselfs throws this on ‘chkcon’ and ‘serverlist’

(node:4296) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected number
    at C:\DiscordToFiveM_JS\bot.js:176:40
    at Array.forEach (<anonymous>)
    at ReturnMessageToDiscord (C:\DiscordToFiveM_JS\bot.js:157:17)
    at Client.on (C:\DiscordToFiveM_JS\bot.js:34:4)
    at emitOne (events.js:116:13)
    at Client.emit (events.js:211:7)
    at MessageCreateHandler.handle (C:\DiscordToFiveM_JS\node_modules\discord.js
\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (C:\DiscordToFiveM_JS\node_modules\discord.
js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (C:\DiscordToFiveM_JS\node_modules\discord.j
s\src\client\websocket\WebSocketConnection.js:330:35)
    at WebSocketConnection.onMessage (C:\DiscordToFiveM_JS\node_modules\discord.
js\src\client\websocket\WebSocketConnection.js:293:17)
(node:4296) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection
 id: 1)
(node:4296) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
 Node.js process with a non-zero exit code.

Reason: Couldnt name server simply

“1”
“2”
“3”

renaming to “Server1” … “Server2” … “Server3” etc… fixed it.

Suggestion:

When it retrieves messages sent on the server, and when player connects and leaves the server it should show @ which server it is. :thinking:

1 Like

I will try to fix the bugs, clean the code and re-do the bot without node.js, as a full FiveM resource as soon as I am done with my current PS4 project.

getting this error when doing node bot.js in cmd

C:\Users\rocki\Desktop\FivemServer\server-data\resources\DiscordToFiveM_JS>node bot.js
(node:18080) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.
at WebSocketConnection.client.ws.connection.once.event (C:\Users\rocki\Desktop\FivemServer\server-data\resources\DiscordToFiveM_JS\node_modules\discord.js\src\client\ClientManager.js:47:41)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at WebSocketConnection.emit (events.js:211:7)
at WebSocketConnection.onClose (C:\Users\rocki\Desktop\FivemServer\server-data\resources\DiscordToFiveM_JS\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:387:10)
at WebSocket.onClose (C:\Users\rocki\Desktop\FivemServer\server-data\resources\DiscordToFiveM_JS\node_modules\ws\lib\event-target.js:124:16)
at emitTwo (events.js:126:13)
at WebSocket.emit (events.js:214:7)
at _receiver.cleanup (C:\Users\rocki\Desktop\FivemServer\server-data\resources\DiscordToFiveM_JS\node_modules\ws\lib\websocket.js:220:12)
at Receiver.cleanup (C:\Users\rocki\Desktop\FivemServer\server-data\resources\DiscordToFiveM_JS\node_modules\ws\lib\receiver.js:535:15)
(node:18080) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18080) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I mean, its right in front of your face

1 Like

Yes I know but what login details is it referring to?

Hi. I would like to ask you for information. I followed each step several times to make sure I set up and install the bot correctly, but when I write the default command (!!cmdlist) nothing happens and the bot goes offline. The only step I do not understand is towards the end, that is: Add the role you created earlier to the new added bot

I need some help. I used an older version of this bot and it worked great. I’ve followed the instructions but there are still some things unclear to me. I got the bot running but any command I put into the channel disappears and nothing happens. I also do not get any errors. Please Help

Things that are unclear to me:

What do I put in for channel name #channel or channel?

Do I put the same channel name for every option? or just for the first on all the blocks?

Do I leave the “server2” “server3” blocks alone or remove them or do I put server1 info in for all?

I found the solution. The problem stemmed from the permissions of Discord. As soon as I gave the BOT all the permissions started working properly :grin:

Done Everything But Get This Error. Can Anyone Help Please!

Make sure everything is correct

{
“token” : “TOKEN”,
“prefix” : “?”
}

Triple checked thats correct even generated a new token just to make sure

Configured everything correctly and did not edit the bot.js. Syntax error.
syntax

Can someone help me install this?

For some reason when the ID’s get in the triple digits i can’t kick or ban… anyone help?

1 Like

Hello! after entering 1 command [doesnt matter which one], the bots stops. I cant use commands with the server thing in it. for example !!kick roerveen [that is the server name] 2 failrp .

If i try that it gives an error. image

I hope you can help me out.

I get to this part but am lost, I type in cmd and do node bot, but it comes up with
‘node’ is not a recognized as an internal or external command,operable program or batch file.

can you show me what the channels.json looks like?