Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Sebastian on Feb 23, 2019, 12:52 AM

Title: Connection 'tween SERVER and DISCORD
Post by: Sebastian on Feb 23, 2019, 12:52 AM
Hey there !

I know there are servers which comunicate to Discord channels,
so I have to ask, as I'm gonna need it:
HOW TO ?

There is a Discord plugin for javascript (https://forum.vc-mp.org/?topic=6543.msg44110#msg44110) plugin, made by @NewK , so everybody can make it happen.
Can somebody do one for Squirrel too ?
Title: Re: Connection 'tween SERVER and DISCORD
Post by: DizzasTeR on Feb 23, 2019, 06:12 AM
The only issue with it is the amount of dependencies that come with it when made with C++. @Luckshya made one in Sleepy-Discord but it had no multi-threading which is kind of a big issue.

I made one in libdiscord, and to avoid a huge havoc of linking errors, I literally compiled the lib and bot on the same vps I'm running my server just to avoid getting all the DLLs and stuff manually ported.

Its just that if the plugin is to be released, it must be released with each linking module manually placed in the server directory for stuff to work and even then sometimes it just didn't because some stuff would be missing that the plugin/library depends on.
Title: Re: Connection 'tween SERVER and DISCORD
Post by: Xmair on Feb 23, 2019, 12:59 PM
I myself used the libdiscord library to work on another thread and am currently using it for the next update of my server. I suggest you to start writing your own plugins as you're an old programmer and have enough experience to get started. For the community, when I've time I'll write another plugin to release publicly.
Title: Re: Connection 'tween SERVER and DISCORD
Post by: Sebastian on Feb 24, 2019, 09:48 AM
Quote from: Xmair on Feb 23, 2019, 12:59 PMI suggest you to start writing your own plugins as you're an old programmer and have enough experience to get started.

I'm not a programmer. Never worked in C++ or C# . Never wanted to.
(can't call coding for vcmp "programming", as that's all I've done)
If I knew how to do it, trust me, this topic wouldn't even exist.

@Luckshya sent me an alpha version of the Sleepy-Discord plugin, so I'm gonna test it these days.
If everything goes smooth, he might release it for the public too.
Title: Re: Connection 'tween SERVER and DISCORD
Post by: ysc3839 on Feb 25, 2019, 12:52 PM
That's why I made python plugin. Because python has lots of useful libraries. For example discord library: https://github.com/Rapptz/discord.py

If you are using squirrel, it's better to make a external app to forward message to discord.
Title: Re: Connection 'tween SERVER and DISCORD
Post by: NewK on Feb 25, 2019, 02:53 PM
Quote from: Sebastian on Feb 23, 2019, 12:52 AMThere is a Discord plugin for javaplugin, made by @NewK
Small correction here; The discord module I made was for the javascript plugin, not the java plugin, java already has a discord library :P
Title: Re: Connection 'tween SERVER and DISCORD
Post by: Sebastian on Feb 26, 2019, 01:08 PM
@ysc3839 Good to see you back around :)

Quote from: NewK on Feb 25, 2019, 02:53 PMSmall correction here; The discord module I made was for the javascript plugin, not the java plugin, java already has a discord library :P

Ah, got it.
/me is going to fix it.
Title: Re: Connection 'tween SERVER and DISCORD
Post by: ysc3839 on Feb 26, 2019, 01:11 PM
@Sebastian #6
I'm always there. :D
Title: Re: Connection 'tween SERVER and DISCORD
Post by: Sebastian on Mar 01, 2019, 03:04 PM
I've tested @Luckshya 's plugin and works like a charm.
He will release the files when the time comes.
Title: Re: Connection 'tween SERVER and DISCORD
Post by: Luckshya on Mar 01, 2019, 04:33 PM
I actually wanted to release the multi-bot plugin instead of this single bot one but due to the limitations of official squirrel plugin, I'll also have to provide with my modified version of squirrel plugin along with it which will be really confusing.

So, only the plugin that I gave to seby (single bot) could work with official squirrel plugin.

However, I was working on a better model of discord plugin for SqMod but I'm facing several problems with it. So that's just what is keeping me away from releasing it, though I have the single bot plugin working great both on windows and linux.

I can link my plugin with any of the libdiscord or sleepy-discord library but thats not the problem.

PS: If anyone else also wants to check out the plugin, you can message me on discord (Luckshya#5109).