For the first time ever - discord integration with VCMP

Started by EK.IceFlake, Dec 19, 2016, 08:08 AM

Previous topic - Next topic

EK.IceFlake


KAKAN

That won't be hard if you're scripting your server using JS. But its a shitty idea...
oh no

EK.IceFlake

Quote from: KAKAN on Dec 19, 2016, 08:32 AMThat won't be hard if you're scripting your browser using JS. But its a shifty idea...
Browser? Did you even see the topic?

Hanney


NewK

Quote from: Hanney on Dec 19, 2016, 08:31 PMDoes this allow some form of voip integration?
"Some form" is the right expression indeed. I've tought about this too before, definitely possible to some degree, but there's only so much we can do with the Discord bot API. Possible? Yes, but a bit clunky and not very intuitive for the player. First of all the player would need to join the discord server manually.

If you're thinking proximity based voip, the best possible solution in my opinion would be to have various voice channels on the discord server (for example one for each vice city district maybe, and some extra ones for specific interiors like malibu, downtown biker bar, ocean beach police station etc... ) and the VCMP server would simply check the coordinates of each player (probably best done on the client not to put too much work on the server) and when a player entered each district or each one of these locations the VCMP server would simply communicate with a Bot on your Discord server through the Discord API that would move the player to the appropriate channel (malibu, downtown, ocean bean etc...). The Discord bot API has no option to lower each users' individual volume on the server though, so when it comes to proximity based voip that's probably the best we're gonna get. There is one other problem though, which is user identification. For instance how could we make a link/connection between the player's vcmp server account and his discord account? There's several approaches the way I see it, but each one has their drawbacks.

- If we simply use the players' nickname, forcing players to mantain the same nickname ingame and on their discord account, what would happen if someone joined the discord channel with your nickname? Last time I tested this was possible to do with discord, not really sure about it nowadays but I believe nicknames can be the same, even if there's a registered account (someone correct me if I'm wrong)

- We could also use the user's unique discord ID, but we'd have to ask the users for their ID's, they could give us wrong ID's or just someone else's ID's.

- The most reliable way to do it would probably be to build a web panel for the VCMP server where users log in with their server accounts and then use OAuth2 to authenticate with their discord accounts, that way linking them with their vcmp server accounts.
It would pretty much work like when you go to some websites that allow you to login with your Facebook/google/twitter account. However this would mean the VCMP server would then have access to your Discord account's key, meaning they would have some degree of control over your Discord account and also access to some of your Discord account information. How much control and how much access would depend on which permissions the VCMP server web panel would ask for. Of course using OAuth2, you'd have to consent these permissions/privileges. So this method is more reliable but you risk exposing your Discord account to whoever owns the server. I know Dropbox had an option for you to manually expire your key that you shared with other websites/apps, not sure if Discord has this.

Implementing all of this in a proper manner using the Squirrel plugin alone might be a handful, someone would probably have to make a module to deal with all of this. (Discord API, OAuth2, etc...) There might be some C++ libraries that already deal with this, but there would still need to be some work putting it into a module and dealing with Squirrel integration.

Implementing it using the Java plugin though would be easy seeing as all the needed libraries already exist in Java. Discord Java API, OAuth2, etc...

So it can work but from a user point of view it might not be very intuitive. I mean, it's not like they would have to do much. They would just need to register a discord account, and an account on the vcmp server, after that, they'd need to log in into their VCMP server account on a web panel and click a button there to link their account to their discord account. They would only need to do this once. And after that, everytime they joined the server while on discord, the integration would be automatically made. However trying to explain to the average VC:MP player how to do this might prove to be a task far more tiring than actually implementing the feature C:-)

PunkNoodle

Quote from: NewK on Dec 20, 2016, 12:39 AM
Quote from: Hanney on Dec 19, 2016, 08:31 PMDoes this allow some form of voip integration?
[...]
If you're thinking proximity based voip, the best possible to solution in my opinion would be to have various voice channels on the discord server (for example one for each vice city district maybe, and some extra ones for specific interiors like malibu, downtown biker bar, ocean beach police station etc... ) and the VCMP server would simply check the coordinates of each player (probably best done on the client not to put too much work on the server) and when a player entered each district or each one of these locations the VCMP server would simply communicate with a Bot on your Discord server through the Discord API that would move the player to the appropriate channel (malibu, downtown, ocean bean etc...). The Discord bot API has no option to lower each users' individual volume on the server though, so when it comes to proximity based voip that's probably the best we're gonna get.
[...]
Yeah that's a possibility although everything would be so much easier if...
Quote from: Stormeus on Apr 06, 2016, 01:08 AMWe could do Mumble integration. Full VoIP built into the client would be a whole other beast.

EK.IceFlake

#6
Staying on stuff which atm is possible, one-way communication (discord>server) could be achieved by using radio streams. However, you'll need to be in a vehicle for that.

Radon


EK.IceFlake

Quote from: Radon on Dec 20, 2016, 12:54 PMGIV DIXORD INVITATION
Are you from Scammer Sub Lounge? Anyways this server is hosted on my PC for development (you can check its status here: http://server.elitekillerz.net/threads/checklist-until-server-release.7) and thus the bot won't be connected 24/7)

Radon

Quote from: EK.CrystalBlue on Dec 20, 2016, 05:02 PM
Quote from: Radon on Dec 20, 2016, 12:54 PMGIV DIXORD INVITATION
Are you from Scammer Sub Lounge? Anyways this server is hosted on my PC for development (you can check its status here: http://server.elitekillerz.net/threads/checklist-until-server-release.7) and thus the bot won't be connected 24/7)
No. I meant give me a invitation to your Discord Server to join it...

EK.IceFlake

Quote from: Radon on Dec 20, 2016, 07:53 PM
Quote from: EK.CrystalBlue on Dec 20, 2016, 05:02 PM
Quote from: Radon on Dec 20, 2016, 12:54 PMGIV DIXORD INVITATION
Are you from Scammer Sub Lounge? Anyways this server is hosted on my PC for development (you can check its status here: http://server.elitekillerz.net/threads/checklist-until-server-release.7) and thus the bot won't be connected 24/7)
No. I meant give me a invitation to your Discord Server to join it...
Wait for my server release (http://server.elitekillerz.net/threads/checklist-until-server-release.7) and I'll release it isa.