[Vixio] Check if player has role using discord ID

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Joyte

New Member
Jul 7, 2020
5
1
0
20
Skript Version: 2.5-alpha3
Skript Author: Me
Minecraft Version: 1.15.2
Addons using:
  • SharpSK - 1.6.3
  • Skript-mirror - 2.0.0-SNAPSHOT - Custom version made by TPGamesNL
  • SkBee - 1.4.2
  • SkQuery - 3.6.5
  • WolvSK - 1.7.0
  • Vixio - 2.0.4

Hi, i'd like to check if a user has a role. I know you can use if event-member has role {@role}, but i'd like to do it while in minecraft. Obviously, there is no event-member in minecraft, so i cannot use that. Is there a specific way to check if a person has a role, using their ID? The reason i need this, is because I've made my own discord-minecraft link system, and would like to check if a player has a role on my discord server. The bot i'm using is on a few discords, so if possible is there a way to only include one specific server?

Here's some code that doesn't work, i'd like it to work like this though:
Code:
command /active:
    trigger:
        #{discord::name::%player%} is the discord id of the player
        if {discord::name::%player%} has role named "Active" in "That One Guy's Streamer Server":
            send "&aYou have the active role!"
        else:
            send "&cNope!"
 
Status
Not open for further replies.