Jump to content

[TUT] Send messages to Discord from MTA with Webhooks (This only works with MTA Server version 1.5.6 or higher!)


MrZsemle

Recommended Posts

  • 5 weeks later...
Posted

@MrZsemle
how come it only allows one word per message?
yqEJknG.png

Paid Roleplay Mapper/Server Management - Message on forums or Discord for info

Fluent with Owlgaming Code. Discord message for paid full set-ups and help

My Discord: 5150#5150 (or .5150)

 

Monky Gaming Roleplay/Adventure Discord 
(English players and servers interested in collaborating or partnering message me)

https://discord.gg/SFBUHknpxy

Posted

You need to change "param" into a table to catch all other subsequent params by using "..." then using table.concat to join them.

-- Test the function
function test(player, command, ...)
  local msg = table.concat({...}," ")
  sendDiscordMessage(msg)
end
addCommandHandler("dcmessage", test)

 

  • Like 3
Posted
7 hours ago, Mr.Loki said:

You need to change "param" into a table to catch all other subsequent params by using "..." then using table.concat to join them.


-- Test the function
function test(player, command, ...)
  local msg = table.concat({...}," ")
  sendDiscordMessage(msg)
end
addCommandHandler("dcmessage", test)

 

Thanks Loki, i'm update the resource.

  • Haha 1
  • 8 months later...
  • 6 months later...
  • 4 weeks later...
  • 2 weeks later...
  • 4 weeks later...
Posted

sockets is better

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

  • 1 month later...
Posted (edited)
On 04/06/2020 at 08:44, OKD Gaming said:

am i doing something wrong?spacer.pngspacer.pngspacer.pngspacer.pngspacer.png

What MTA Server version do you using?

In the future - if someone needs help, or found a bug, wants to give an advice - please consider using my GitHub Issues, or DM me.

Edited by MrZsemle
  • 3 weeks later...
Posted

Hello MrZsemle I was wondering if there is any way to create messages in a way that the discord will not embed because I tried to do it here and it didn't work.

  • 4 weeks later...
  • 2 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...