DsCommands - NobelD/NobleWhitelist GitHub Wiki

Understanding how it works

Permission:

  • The admin-only-for-server-management in config makes the command to use the permission of server management, this means only users with this permission can see the admin commands, so it will be hidden to other users.

Roles:

  • The roles inside a command entry means which users can use the command.
  • These roles are the name of the defined roles in config, not the actual role names.
  • If enable-everyone-role is enabled, you can use the everyone keyword inside the roles of a command.

Channels:

  • The channels inside a command entry means where the command can be used.

Requirements:

  • All the commands have some extra internal requirements.
  • The commands need to be used from a valid user (no bots or any other type of non-human user)
  • The commands need to be used on a valid text channel.
  • The commands need to be used on a guild (server) and needs to be the same as specified on the config.
  • The commands need to have a valid interaction, this usually never happens, only for internal reasons.

Example of the config file:

# Example of a command entry with channel and role

channel: # here you define the channels by their id and associate a name for each, only one channel per name
  primary: <channel-id>
  staff: <channel-id>
role: # Here you define the roles by their id and associate a name, you can set multiple roles for a single name
  enable-everyone-role: true
  #everyone #(enabling the toggle internally register everyone as other role, so if other entry with the same name exists may be ignored)
  staff:
  - <role-id>
  admin:
  - <role-id>
  ...
command:
  basic-add-self:
    role: # The roles which can use this command, in this case everyone (as is enabled)
      - everyone
    channel: # The channels where the commands can be used
      - primary 
      - staff
  admin-add:
    role:
      - staff
      - admin
    channel:
      - staff

Commands:

The "<>" means the argument is optional.
The "[]" means the argument is required.
The "><" means at least one of the arguments is required.
Text without prefix/suffix means is a literal argument.

  • Basic Add Self: /whitelist add >name< >uuid<

    • Command for users, register the user account and links it with the user id who executed the command.
    • (Temp) The users can only have 1 registered account, if any already registered user uses the command, it will be disallowed.
  • Basic Remove Self: /whitelist remove

    • Command for users, removes the user's registered account from the whitelist.
  • Basic Link Self /whitelist link

    • Currently unused because any user without an account could pick any account which does not have a user linked.
    • Command for users, allows linking one account to the user.
  • Basic Self Accounts /whitelist accounts

    • Command for users, tells them which account they are linked.
  • Admin Add /wladmin add >name< >uuid< <user>

    • Command for staff, adds the entry to the whitelist if it does not exist.
  • Admin Remove /wladmin remove >name< >uuid< >user<

    • Command for staff, removes any matching entry with one of the arguments from the whitelist.
  • Admin On /wladmin on

    • Command for staff, toggles on the whitelist.
  • Admin Off /wladmin off

    • Command for staff, toggles off the whitelist.
  • Admin Perm Status /wladmin permstatus

    • Command for staff, get info about the permission check.
  • Admin Perm Set /wladmin permset [number]

    • Command for staff, sets the minimum permission bypass allowed.
  • Admin Checking Status /wladmin checkstatus

    • Command for staff, get info about the join checks.
  • Admin Checking Set /wladmin checkset [type] [option]

    • Command for staff, sets the join check to the provided option.
  • Admin List /wladmin list <page>

    • Command for staff, gets a list of entries of the whitelist, from the specified page.
  • Admin Find /wladmin find >name< >uuid<

    • Command for staff, gets a whitelist entry of the matching name or uuid.
  • Admin Find User /wladmin find [user]

    • Command for staff, gets a whitelist entry of the matching user.
  • Admin User Link /wladmin link >name< >uuid< >user<

    • Command for staff, requires 2 arguments, sets the values to the found entry by the same values.
  • Admin User Unlink /wladmin unlink >name< >uuid< >user<

    • Command for staff, requires 2 arguments, unsets the values to the found entry by the same values.
  • Admin User Toggle /wladmin toggle [state] >name< >uuid< >user<

    • Command for staff, toggles if the user can join or not to the server, keeping the entry.
  • Admin Send /wladmin send <content> <button> <buttonType> <emoji> <channel> <message>

    • Command for staff, experimental, uses the same entry as /wladmin add
    • Content: The content of the message.
    • Button: The button content.
    • ButtonType: The button style.
    • Emoji: The emoji of the button, as a string (<{name}:{id}>)
    • Channel: The channel to send the message, default is where the command was executed.
    • Message: The message to edit.
⚠️ **GitHub.com Fallback** ⚠️