[Release] FiveM To Discord

Are you able to edit what the bot says when someone joins. I.e. add an “@Tag” in the discord right before the “So and so has connect” message?

ofcourse. look in the files.

Dear God. Why would you do that.
You will mention someone every time a user connects.

Definitely not exactly what I may or may not be planning to do to fuck with someone for a day :slight_smile:

Alright, so recently my server changed chat from the old CFX to the new FX chat. We already had the resource when we were using CFX chat and it worked perfectly. However, now we changed chats we are having issues with some messages not being sent, these messages are only starting with /.

is it possible to set it up where it only sends messages to discord when they type a specific command like /911

Love this! Wish it would work reverse tho.

Oh also… Please filter out @ since it can tag everyone.

I tried to link the resource to vRP but I always get a error(tried the way that i used to link and it worked in other stuff) so, this resource dont support vRP right?!

I can just say its fucking amazing

1 Like

when will 1.5.2 be not buggy? and safe to update

i downloaded this done everything it said yet it still doesnt post in discord ?

Hi, nice release, but special commands like /ooc aren’t sent to discord. Only the normal chat… I’m using esx_rpchat

If you have any resource that uses CancelEvent() to manipulate chat strings, it breaks this resource. This isn’t a design flaw in THIS resource, it’s just how it works.

1 Like

I find this confusing…

okay in game chat to discord chat works but we cant chat back to in game?

help me

InvokeNative: execution failed: parse error - unexpected ‘"’
Error running system event handling function for resource DiscordBot: citizen:/s
cripting/lua/scheduler.lua:41: Failed to execute thread: Execution of native 000
000008e8cc653 in script host failed.
stack traceback:
[C]: in upvalue ‘_in’
citizen:/scripting/lua/natives_server.lua:270: in function ‘PerformHttpR
equestInternal’
citizen:/scripting/lua/scheduler.lua:287: in function ‘PerformHttpReques
t’
SERVER/Server.lua:152: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scriptin
g/lua/scheduler.lua:174>
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scriptin
g/lua/scheduler.lua:138>
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scriptin
g/lua/scheduler.lua:138>

I have tried but /ooc does not work for me… I am using esx rpchat as well
everything else works as far as commands. anything /whatever works but /ooc does not

Is Anyone That’s Out There That Can Help Me, Does Anyone Know How To Blacklist Normal Text Chat Like So It Doesn’t Print Text Chat And Only Commands So I Can Have A Commands Only Specific Channel

I love this script, really great work, thank you.

I am having a small problem, for some reason the line of code below will print the correct message to chat but the bot does not send it to Discord, here is the code:

TriggerEvent('chatMessage', "^1911 [Police] - Caller ID | " .. name .. "^0:^3 Location: ^0" .. street .. " ^3Incident", { 255, 187, 51 }, message .. "!")

I also have another line of code that produces the expected message in chat but for some reason does not get transmitted to Discord:

TriggerClientEvent('chatMessage', -1, 'Police System', {255, 255, 255},'Officer ^2' .. GetPlayerName(_source) .. ' ^7Has pushed their panic button. Location: ' .. street)

I have another piece of code from another addon I am using that is very similar to the line above and it sends to Discord fine, that line of code is:

TriggerEvent('chatMessage', "", { 0, 0, 0 }, "^1911 [Police] -^0:^3 Silent alarm activated at ^0" .. info2.title .. " ^3(LOCATION: ".. info2.location .."!")

Can anyone please tell me how I might edit these two lines of code so that the bot will register it and send it to my Discord channel…?

Thank you to anyone who may be able to help.