qb-core
qb-core copied to clipboard
Feat: Add discord to players DB table
Description
Nowadays most servers using QBCore uses discord whitelist, so the player will have their discord linked to FiveM. To ease integration with webapges I think discord information in main qbcore database table (players) should be kept to easy locate characters linked to a player.
Checklist
- [x] I have personally loaded this code into an updated qbcore project and checked all of its functionality.
- [x] My code fits the style guidelines.
- [x] My PR fits the contribution guidelines.
Just updated, I dont really know if QBCore.Functions.GetIdentifier does retrieve null because if we follow the documentation of the function GetPlayerIdentifierByType and it is right, it always return a string so, the sub will happen in a string, but change it if the docs are not correct
QBCore.Functions.GetIdentifier can very much return nil.
You will be correct if you are talking about old qbcore, now it uses the native:
https://github.com/qbcore-framework/qb-core/blob/e488cbe61e661dc86d16d9e9e7ed4b3e1e341cea/server/functions.lua#L24-L27
Maybe add something to the config.lua to turn this on and off
Well, because the SQL file was change, I feel that it shouldn't be optional
This PR has had 60 days of inactivity & will close within 7 days
What about this?
Could you possibly elaborate on the use case example you mentioned?
Could you possibly elaborate on the use case example you mentioned?
Yes, for example if u want to get have an admin menu to see all players data (no matters they are online or not) it is always easier, mostly for RP servers, to locate players based on discord Id.
Also if u want to integrate your sv with a discord bot or maybe a Webpage with discord login this will be helpful.
Discord is the main way gaming communities get along right now, and a better integration with this programme providing more critical data storing can become handy.
The idea is fine but needs more thought instead of just saving additional information
As I said before, is not only for just saving data, is for future scripts functionality and for easier Web integration
I think it really should be added. This will allow new scripts with new innovations