This page details commands for the Levels module of LDU2. If you need any help, feel free to join the discord server!
Setup Commands
This section contains all the commands you might need to set up the levels module to your server's needs. The required permissions are noted in brackets. All command permissions can be edited in Discord's commands menu in server settings.
/set_levelup_channel [channel] (manage_channels)
This command will set the channel in which to send level-up messages. If it is left unset, it will send messages to DM, unless /server_shut_up (for the whole server) or /shut_up (for the single user) is enabled. If you want to set it back to DMs, simply select the current levelup channel again and it will be unset.
Example: /set_levelup_channel #bot-commands
/set_xp_range [min] [max] (manage_roles)
This command will set the range in which point amounts will be granted. Points are awarded on message, granting a random amount of XP inside this range. Some things may trigger additional "rolls", for example an image attachment will give additional amount of points within this range on top of the base value. Long messages also trigger re-rolls corresponding to their length.
Both values must be integers (i.e., no decimals)
Example: /set_xp_range 1 50 (this will average to 25 points per message, bonus points notwithstanding)
A message with an image would roll 1-50 + 1-50 (avg 50 points)
/set_level_role [level] [role] (manage_roles)
This command will add a role reward to be granted at the given level. Only one role can be set per level. The reward can be unset with /unset_level_role [level]
Example: /set_level_role 5 Frequenter
(this can be undone with /unset_level_role 5)
/toggle_xp [channel] (manage_channels)
This command will enable/disable whether XP can be earned in a channel. All channels are enabled by default.
Example: /toggle_xp #spam-channel
/set_server_theme [hex colour code] (manage_channels)
This command sets the base colour that generated images (i.e. /leaderboard and /rank) use for their themes. Given a base hex code, a colour palette will automatically be calculated. Alternatively, if no server theme is selected, it will be chosen randomly from a group of presets themes. The theme can be reset by passing "reset" in place of a colour code. It is not required to include the leading #.
Example: /set_server_theme #ffaa00 or /set_server_theme reset
Admin Commands
/add_points [user] [amount] (manage_roles)
This command simply awards XP to the user. Awarded points can be negative, which has the effect of removing points from the user. If the users points go down, role rewards are not automatically removed. A user's points & level value can be negative with no issue.
Example: /add_points @laukins 25
/set_points [user] [amount] (manage_roles)
This command simply sets a user's XP value. If the users points go down, role rewards are not automatically removed. A user's points & level value can be negative with no issue.level ≈ floor(sqrt(points) / k), where k is a value not yet settable. By default k is 5.34.
Example: /set_points @laukins 0