Vice City: Multiplayer
Community Projects => SLC's Squirrel Plugin => Topic started by: Luckshya on March 3rd, 2019, 03:09 PM
I was working on this Discord plugin since many days but I've completed the plugin for SqMod now.
The plugin won't be available for official Squirrel plugin because it is missing some very important things like some plugin commands and squirrel API functions that developers failed to provide.
Though, I have modified the squirrel plugin and made some changes and added some missing necessary things required plugins but still something is wrong with code or I don't know that makes it produce some weird errors.
For official squirrel plugin, I can provide with a simple single bot plugin.
This plugin is a multi-bot plugin.
This plugin basically has 2 versions that binds with
It is up to you to decide whether you want to use the sleepydiscord one or libdiscord one.
The plugin doesn't really require any such sort of documentation. So, the example code would do the work.
local matches = Regex_Match("regex string", "value string"); // returns a bool
//Playing a game
- Sleepydiscord: https://gist.github.com/Luckshya/567cf81e428b298d63a9818127975d4c
- libdiscord: https://gist.github.com/Luckshya/28b639d297fb17ce8d2f9d5a388fed0b
- Sleepy-Discord: https://github.com/yourWaifu/sleepy-discord
- libdiscord: https://github.com/Luckshya/libdiscord
Plugin Source (Sleepy-Discord) : https://github.com/Luckshya/SqMod-Discord1
Plugin Source (libdiscord) : https://github.com/Luckshya/SqMod-Discord
Install OpenSSL from here: https://slproweb.com/products/Win32OpenSSL.html
Don't change any options while installing openssl.
apt-get install libssl-dev
(32 bit not available for now)
apt-get install libcpprest-dev
(32 bit not available for now)
The most important thing:
- @. (SLC): I've learnt a lot from his code and I've also implemented and used his code. He has also helped me throughout the problems including my stupid problems or whatever. He's just like the author of the plugin tbh.
NOTE: You need to take care of the Discord rate limit yourself.
There has been alot of effort put into this, one way or the other, great job!
Sleepy-Discord Binaries are available now!
Added function Regex_Match to check for special character/symbols for discord. More details in the main post.
Fixed issue that crashes the server while closing. Make sure you update the binaries from the latest release on the repo.
A new update 0.2 has been released that brings the following changes.
- Fixed an issue that causes server to crash when a DM is received by the bot.
- Added param authorID to the event onMessage as updated in the example code.
Make sure you update the binaries from the latest release on the repo.
Update v0.2.1 changelog.
- Added param authorNick to event onMessage
- Added function GetRoleName to get the name of role using server ID and role ID
- Fixed an issue of updating roles and other things in Sleepy-Discord version
Example scripts have been updated.
Make sure you get the latest binaries from the latest release on the repo.
Update v0.2.2 changelog.
- Added function SetActivity. More information about it in main post.
- Fixed several bugs
NOTE: libdiscord users should not send empty messages or the message like "" or "\n" or "msg\n" or the server will crash. Support for it may be released in the next version.
Valid message can be: "\nmessage", "msg1\nmsg2"