JeViCo Posted February 4, 2019 Share Posted February 4, 2019 I know about socket module that can manage with it. Also i can output mta messages on discord server using web hook, but can i do it in opposite direction? I mean can i output discord messages on mta server without additional modules? 1 Link to comment
Moderators IIYAMA Posted February 6, 2019 Moderators Share Posted February 6, 2019 You probably will need modules for the communication between your bot to discord. There must be a lot of security stuff in it, so you do not want without that. https://discord.js.org/#/ From your bot to MTA, a socket is not required. Nodejs has a build in module https, which you can use. https://www.twilio.com/blog/2017/08/http-requests-in-node-js.html And on the MTA side: There you can create your HTML file which you can use to receive requests. https://wiki.multitheftauto.com/wiki/Resource_Web_Access table form: This is a table containing all the form data submitted to the page using HTTP POST combined with any variables passed in the querystring with HTTP GET. The variable form should be available in your HTML file which can contain the message data from a post request. It can be complicated stuff if you haven't worked without sockets before. But that doesn't mean that you should give up. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now