JaredScar / Badger_Discord_API

A FiveM API Script [created by Badger]
MIT License
56 stars 48 forks source link

Add functunality #27

Closed Mat40 closed 1 year ago

Mat40 commented 1 year ago

Hey, that would be great if you can add a fonction to check if a player has a specific role. This could return a boolean value.

JaredScar commented 1 year ago

This would be inefficient since getting all the roles is what has to hit the Discord endpoint. If you use caching, then it could make sense. Still, since it's cached, you could just loop through all of them and check if the role exists. Making a function for this wouldn't speed up anything besides people not taking the time to write it themselves. Perhaps in the future though or if anyone wants to make a PR to do so. Not opposed to it.