Posts: 845
Threads: 3
Joined: Jun 2010
I think I'll give it a try. I'll have to further read into the documentation though, since there is no Discord library for C++, so I need to do everything manually by the book (or rather documentation).
If I understood correctly, that plugin should mainly provide a callback which is always called when someone writes a message in one of the server's channels, right?
Oh, and if anyone has some experience with adding/configuring bots to their servers, I'd appreciate it if he/she would explain that process to me.
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by Alex Magaсa
|
That only adds a bot to sit in the channel.. It doesn't link. There are others that are more focused to linking IRC to discord.
That bot is simply a responding bot to triggers... It's not actually using a plugin setup to do anything more than triggered responses.
Hell, on the discord site it has an actual API usage and showing how to make an actual bot that's useful.
Posts: 68
Threads: 7
Joined: Oct 2014
Would be nice If someone dev it since I'm using mIRC for my zombie server and we have a Discord channel too.
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by Ner0x96
Would be nice If someone dev it since I'm using mIRC for my zombie server and we have a Discord channel too.
|
You can already link IRC to discord if you'd read some more of the thread.
Posts: 6,242
Threads: 8
Joined: Jun 2008
What discord features, is a lot. You can almost do away with a forum, and simply use a discord server.
Various channels can have the rules, accepted mods, downloads and other information in it ready for people to bring up via a link. You could even use the weburl of SA-MP server to make the discord known about.
You don't necessarily need to be connected all the time, but it is a lot less heavy than TeamSpeak, and it has a lot more to offer than simply text/voice comms.
Posts: 797
Threads: 21
Joined: Jan 2007
Reputation:
0
This is how I started with ScriptPlayer.. a thread that goes on for 3 years of people saying 'This would be a good idea... *stares at sunset*'.
Can't do it this time, but this is a good idea... *stares into sunset*
My suggestion, get a socket plugin that allows your SAMP server to be a 'client' to something like a nodejs tcp server, and the nodejs server can connect with WebSockets to Discord. Node.JS would basically be your relay.
Thats a quick and dirty method. Or you could fiddle with C++ and WebSockets.. no thanks!
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by Pghpunkid
Or you could fiddle with C++ and WebSockets.. no thanks!
|
Hehe.
So, a small status update: My plugin can successfully send/retrieve HTTPS requests/responses. Also connecting to the Discord gateway through a TLS secured WebSocket works. I'll only have to implement the heartbeat and reconnect functionality. After that adding all callbacks and functions should be pretty straightforward.
Posts: 845
Threads: 3
Joined: Jun 2010
Okay, so basically I'm ready to add actual PAWN natives and callbacks.
Let's collect a list of all functions and callbacks you need/want.
Regarding the chat callback, which information should be passed to it (apart of the message itself, author id and channel id)?
Posts: 3,324
Threads: 96
Joined: Sep 2013
Quote:
Originally Posted by maddinat0r
Okay, so basically I'm ready to add actual PAWN natives and callbacks.
Let's collect a list of all functions and callbacks you need/want.
Regarding the chat callback, which information should be passed to it (apart of the message itself, author id and channel id)?
|
Question, how will markdown and file transfers be handled? Personally I'm fine with code and stuff being cut and replaced with something like "(code here)", but that should be optional and controllable by the script. Bold and italics should also be detectable and controllable by the script (we could represent then with different color times and such), but by default just replace with regular text.
Posts: 845
Threads: 3
Joined: Jun 2010
Quote:
Originally Posted by Humza
in Discord u can also play songs. If is that able to play via discord will be quite awesome.
|
Please no overkill/unnecessary feature requests.
Quote:
Originally Posted by Crayder
Question, how will markdown and file transfers be handled? Personally I'm fine with code and stuff being cut and replaced with something like "(code here)", but that should be optional and controllable by the script. Bold and italics should also be detectable and controllable by the script (we could represent then with different color times and such), but by default just replace with regular text.
|
Isn't the markdown formatting handled by Discord itself? So you basically always receive/send markdown formatted chat messages. I'm also unsure if the plugin should handle Markdown syntax removal. I'd leave that to the PAWN-scripter.
I can add functionality to upload files, however I don't see much use for this. If someone uploads a file, the plugin receives a file object with the file's name, size and source URL. I can add a callback which gets called on every file upload and pass it that information, however yet again I don't see how this could be relevant on SA-MP server-side.