Sueta

DiscordEasyWhitelist

v2.3.0

Manage SimpleWhitelist with DiscordSRV integration

·Plugin

DiscordEasyWhitelist

Table of Contents


Overview

DiscordEasyWhitelist provides both simple access to the SimpleWhitelist and advanced features for managing player access to the server. Nearly all features can be disabled or modified, allowing for flexible customization.


Slash Commands

💡 Tip:
[variables] in square brackets are not required
<variables> in angle brackets are required

/whitelist

💡 Tip:
Requires moderator role to access

Provides access to SimpleWhitelist

/whitelist check <nickname>

  • Checks if SimpleWhitelist contains specified nickname

/whitelist add <nickname>

  • Adds specified nickname to SimpleWhitelist

/whitelist remove <nickname>

  • Removed specified nickname from SimpleWhitelist

/link

💡 Tip:
Requires moderator role to access

Provides access to DiscordSRV's linking feature

/link check [user] [nickname]

  • Checks if user OR nickname. Only one argument is needed

/link add <user> <nickname>

  • Links user with nickanme if both of them aren't linked yet

/link remove [user] [nickname]

  • Removes link from user OR nickname. Only one argument is needed

/accept

💡 Tip:
Requires moderator role to access

/accept <user> <nickname>

Complex comand that can execute following tasks if configured accordingly:

  • Link user to nickname
  • Add nickname to SimpleWhitelist
  • Change user's guild name to nickname
  • Add specified list of roles to user
  • Remove specified list of roles from user
  • Send welcome message in specified channel

/remove

💡 Tip:
Requires moderator role to access

/remove <user> [nickname] [reason]

❗ Important:
nickname is optional argument because command can execute series of checks to determine nickname on it's own if it wasn't provided.
Details on this will be provided later in Configuration section

Complex comand that can execute following tasks if configured accordingly:

  • Unlink user from any in-game nickname
  • Remove nickname from SimpleWhitelist
  • Kick from game if nickname is on the server
  • Ban user from guild
  • Send remove message in specified channel
  • Send direct message to user

/status

💡 Tip:
Does NOT require moderator role to access

/status

  • Prints amount of players online, list of them, while annotation linked players with discord mention

/reload

💡 Tip:
Requires moderator role to access

/reload

  • Reloads config options from files

Configuration

Plugin uses 2 files to configurate itself:

  • general.yml - Contains options to disable/enable certain funmctionality, but also contains role and channel IDs
  • langugae.yml - Contains all possible feedback messages plugin can send

❗ Important:
If files doesn't exist (e.g. on first start), general.yml, langugae.yml AND langugae.russian.yml will be generated.
langugae.russian.yml is langugae.yml translated to russian langugae

general.yml

moderator-roles

  • Type: List of strings
  • Description: List of discord role IDs that will be treated as moderators

whitelist

enable

  • Type: Boolean
  • Description: If /whitelist slash command will be enabled

link

enable

  • Type: Boolean
  • Description: If /link slash command will be enabled

accept

enable

  • Type: Boolean
  • Description: If /accept slash command will be enabled

link-to-nickname

  • Type: Boolean
  • Description: If user should be linked to nickname

add-to-whitelist

  • Type: Boolean
  • Description: If nickname should be added to SimpleWhitelist

change-guild-name

  • Type: Boolean
  • Description: If user's guild name should be changed to nickname

add-roles

  • Type: Boolean
  • Description: If bot should add roles to user

roles-to-add

  • Type: List of strings
  • Description: List of role IDs that should be added to user

remove-roles

  • Type: Boolean
  • Description: If bot should remove roles from user

roles-to-remove

  • Type: List of strings
  • Description: List of role IDs that should be removed from user

send-welcome-message

  • Type: Boolean
  • Description: If bot should send welcome message to specified channel

welcome-channel-id

  • Type: String
  • Description: Channel ID where welcome message should be sent

remove

enable

  • Type: Boolean
  • Description: If /remove slash command will be enabled

unlink-from-nickname

  • Type: Boolean
  • Description: If user should be unlinked from any linked nickname

fallback-to-guild-username

  • Type: Boolean
  • Description: If /remove should fallback to guild name if it can't determine nickname from linking.
    /remove uses series of checks to determine nickname if it wasn't provided amnually, here is an overview of the algorithm:
    If moderator entered a nickname
        Check if nickname linked to discord
            - Linked to this user -> unlink, proceed
            - Nickname or discord linked to someone else -> error
            - Not linked -> warning, proceed
    If moderator didn't enter a nickname
        Check if discord linked to nickname
            If linked, try to resolve nickname
                - Nickname can be resolved -> unlink, proceed
                - Nickname can't be resolved -> warning, proceed
            If not linked, check if we can fallback
                - Fallback isn't turned on -> error
                - Fallback turned on -> warning, fallback to discord name, proceed
    

remove-from-whitelist

  • Type: Boolean
  • Description: If nickname should be removed from SimpleWhitelist

kick-from-game-if-online

  • Type: Boolean
  • Description: If plugin should kick any player with nickname that is on the server

send-direct-message

  • Type: Boolean
  • Description: If bot should send direct message to user

send-remove-message

  • Type: Boolean
  • Description: If bot should send remove message to specified channel

remove-channel-id

  • Type: String
  • Description: Channel ID where remove message should be sent

ban-from-guild

  • Type: Boolean
  • Description: If bot should ban user from guild

leave

enable

  • Type: Boolean
  • Description: If bot should track user leaving from guild and execute tasks

unlink-if-available

  • Type: Boolean
  • Description: If user should be unlinked from any linked nickname

remove-from-whitelist

  • Type: Boolean
  • Description: If nickname should be removed from SimpleWhitelist

kick-from-game-if-online

  • Type: Boolean
  • Description: If plugin should kick any player with nickname that is on the server

ban-from-guild

  • Type: Boolean
  • Description: If bot should ban user from guild

send-direct-message

  • Type: Boolean
  • Description: If bot should send direct message to user

send-leave-message

  • Type: Boolean
  • Description: If bot should send remove message to specified channel

leave-channel-id

  • Type: String
  • Description: Channel ID where remove message should be sent

send-report-message

  • Type: Boolean
  • Description: If bot should send report message to specified channel.
    Since bot can't repond to any slash-command, it can, and should, send report message what tasks he executed

report-channel-id

  • Type: String
  • Description: Channel ID where report message should be sent

status

enable

  • Type: Boolean
  • Description: If /status slash command will be enabled

language.yml

This file defines all messages the plugin can send in Discord
It supports placeholders and can contain multi-line lists for messages with multiple lines.

❗ Important:
If file doesn't exist, language.yml and language.russian.yml will be generated automatically.
language.russian.yml is a full translation of this file into Russian language.


error-prefix

  • Type: String
  • Description: Prefix added to all error messages

warning-prefix

  • Type: String
  • Description: Prefix added to all warning messages

success-prefix

  • Type: String
  • Description: Prefix added to all success messages

general

unknown-error

  • Type: String
  • Description: Sent when an unexpected error occurs

no-permission

  • Type: String
  • Description: Sent when user doesn't have permission to use the command

wrong-command-argument

  • Type: String
  • Description: Sent when command argument is invalid
  • Placeholders:
    • {command} - command used
    • {arg} - name of argument

no-command-argument

  • Type: String
  • Description: Sent when user doesn’t provide required arguments

too-many-command-arguments

  • Type: String
  • Description: Sent when too many arguments are provided

channel-not-found

  • Type: String
  • Description: Sent when channel ID from config can’t be resolved
  • Placeholders:
    • {channel_id} - ID of channel that wasn't found

user-not-on-server

  • Type: String
  • Description: Sent when user is not a member of the Discord guild
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user

accept

disabled

  • Type: String
  • Description: Sent when /accept command is disabled

link-warning-already-others

  • Type: String
  • Description: Shown when nickname or user is already linked to someone else
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {uuid} - minecraft UUID
    • {nickname} - minecraft nickname

link-warning-already-same

  • Type: String
  • Description: Sent when user is already linked to the same nickname
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {uuid} - minecraft UUID
    • {nickname} - minecraft nickname

link-success

  • Type: String
  • Description: Sent when user was successfully linked to nickname
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {uuid} - minecraft UUID
    • {nickname} - minecraft nickname

whitelist-warning-already

  • Type: String
  • Description: Sent when nickname is already in whitelist
  • Placeholders:
    • {nickname} - minecraft nickname

whitelist-success

  • Type: String
  • Description: Sent when nickname was added to whitelist
  • Placeholders:
    • {nickname} - minecraft nickname

guild-name-success

  • Type: String
  • Description: Sent when user’s guild name was changed to nickname
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {nickname} - minecraft nickname

guild-role-remove-success

  • Type: String
  • Description: Sent when roles were removed from user
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {roles} - formatted string that will contain all mentions of all removed roles

guild-role-add-success

  • Type: String
  • Description: Sent when roles were added to user
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {roles} - formatted string that will contain all mentions of all added roles

welcome-message

  • Type: List of strings
  • Description: Multi-line message sent to welcome channel
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {nickname} - minecraft nickname
    • {moderator_mention} - formatted string that will mention moderator
    • {moderator_username} - discord username of the moderator
    • {moderator_name} - discord name of the moderator
    • {moderator_id} - discord ID of the moderator

welcome-message-success

  • Type: String
  • Description: Confirmation message that welcome message was sent
  • Placeholders:
    • {channel_id} - ID of channel where message was sent

accept-success

  • Type: String
  • Description: Final summary log message
  • Placeholders:
    • {report} - formatted message that contains list of executed tasks

remove

disabled

  • Type: String
  • Description: Sent when /remove command is disabled

link-error-other

  • Type: String
  • Description: Shown when nickname or user are already linked to someone else
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {nickname} - minecraft nickname

link-error-never-played

  • Type: String
  • Description: Shown when user never joined server and nickname can’t be resolved
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user

link-error-not-linked

  • Type: String
  • Description: Shown when user isn’t linked to any nickname
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user

link-warning-not-linked

  • Type: String
  • Description: Warning when user isn’t linked to provided nickname
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {nickname} - minecraft nickname

link-warning-not-linked-fallback

  • Type: String
  • Description: Warning when user isn’t linked and fallback nickname is used
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {fallback} - fallback name that will be used as minecraft nickname

link-success

  • Type: String
  • Description: Sent when unlinking succeeded
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {uuid} - minecraft UUID
    • {nickname} - minecraft nickname

whitelist-warning-already

  • Type: String
  • Description: Sent when nickname is already missing from whitelist
  • Placeholders:
    • {nickname} - minecraft nickname

whitelist-success

  • Type: String
  • Description: Sent when nickname was removed from whitelist
  • Placeholders:
    • {nickname} - minecraft nickname

kick-message

  • Type: Component
  • Description: Message that will be shown to kicked player

remove-message

  • Type: List of strings
  • Description: Message template sent in Discord remove channel
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {nickname} - minecraft nickname
    • {moderator_mention} - formatted string that will mention moderator
    • {moderator_username} - discord username of the moderator
    • {moderator_name} - discord name of the moderator
    • {moderator_id} - discord ID of the moderator

remove-message-reason

  • Type: List of strings
  • Description: Message with reason sent in remove channel
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user
    • {nickname} - minecraft nickname
    • {moderator_mention} - formatted string that will mention moderator
    • {moderator_username} - discord username of the moderator
    • {moderator_name} - discord name of the moderator
    • {moderator_id} - discord ID of the moderator
    • {reason} - reason of removal

remove-message-success

  • Type: String
  • Description: Confirmation message for sent remove message
  • Placeholders:
    • {channel_id} - ID of channel where message was sent

remove-direct-message

  • Type: List of strings
  • Description: DM message sent to user

remove-direct-message-reason

  • Type: List of strings
  • Description: DM message with reason sent to user
  • Placeholders:
    • {reason} - reason of removal

remove-direct-message-success

  • Type: String
  • Description: Confirmation that DM was sent successfully
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user

remove-direct-message-failure

  • Type: String
  • Description: Sent when user has closed DMs
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user

guild-ban-reason

  • Type: String
  • Description: Reason used for Discord guild ban

guild-ban-success

  • Type: String
  • Description: Confirmation that user was banned from guild
  • Placeholders:
    • {discord_mention} - formatted string that will mention user
    • {discord_username} - discord username of the user
    • {discord_name} - discord name of the user
    • {discord_id} - discord ID of the user

remove-success

  • Type: String
  • Description: Final log message
  • Placeholders:
    • {report} - formatted message that contains list of executed tasks

whitelist

disabled

  • Type: String
  • Description: Sent when /whitelist command is disabled
  • Placeholders:
    • {nickname} - minecraft nickname

contains-nickname

  • Type: String
  • Description: Sent when nickname exists in whitelist
  • Placeholders:
    • {nickname} - minecraft nickname

not-contains-nickname

  • Type: String
  • Description: Sent when nickname doesn’t exist in whitelist
  • Placeholders:
    • {nickname} - minecraft nickname

added-nickname

  • Type: String
  • Description: Sent when nickname added successfully
  • Placeholders:
    • {nickname} - minecraft nickname

not-added-nickname

  • Type: String
  • Description: Sent when nickname was already present
  • Placeholders:
    • {nickname} - minecraft nickname

removed-nickname

  • Type: String
  • Description: Sent when nickname was removed successfully
  • Placeholders:
    • {nickname} - minecraft n

Similar projects

Plugin →