1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Vixio] Check if player has role using discord ID

Discussion in 'Skript' started by Joyte, Jul 21, 2020.

Tags:
Thread Status:
Not open for further replies.
  1. Joyte

    Joyte New Member

    Joined:
    Jul 7, 2020
    Messages:
    5
    Likes Received:
    1
    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 (Text):
    1.  
    2. command /active:
    3.     trigger:
    4.         #{discord::name::%player%} is the discord id of the player
    5.         if {discord::name::%player%} has role named "Active" in "That One Guy's Streamer Server":
    6.             send "&aYou have the active role!"
    7.         else:
    8.             send "&cNope!"
    9.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...