# Leveling

## Prerequisites

In order to use leveling, make sure the bot has the manage roles permission.

## What is Leveling?

The leveling module of Eventcord allows your members to earn XP and rank up based on how they interact with the server. How much they earn and what activities they earn from are highly customizable. Leveling currently uses various factors (see below) to reward active and meaningful participation in a server.

### XP Factors

Eventcord uses different interactions with the server and rewards XP. Each of the factors listed below are rate limited to prevent spam and abuse of the system.
Messages
Replies
Reactions
Voice Channels
Given XP
Members can earn XP for actively messaging in a server. XP will be rewarded for each minute a message is sent (similar to MEE6).
Members can receive XP when their messages are replied to. Members who send a reply will receive message XP.
Members can receive XP for earning reactions. This is similar to upvotes on Reddit.
Members can receive XP for every minute they spend in a voice channel. It is recommended that you set an AFK channel through Discord to prevent abuse. If you have an AFK channel, you should add it to the voice channel blacklist on the dashboard.
Members can receive XP from server managers using the xp command.
If you notice the leveling system acting strange, a way to abuse the system, or have any suggestions; join the support server.

### How Levels are Calculated from XP

Levels are calculated using a leveling constant for each server, which we'll label the variable k. This is used in the simple equation below, which is rounded down to the nearest whole number. This gives the level based on x xp.
$L(x) = (k/10) * \sqrt{x}$
Currently the leveling constant cannot be configured manually by server. It is set at 1 by default on all servers. A future update may allow for manual configuration of this.

## Using Leveling

### Enabling the Module

Leveling is an addon to Eventcord's base functionality. Visit the dashboard, select your server, click leveling in the menu, and click the switch to enable the module. Only members with the manage server permission can enable/disable this module.

### Customization

Customization of the leveling module requires the manage server permission.

#### Factors

Each of the factors can be either disabled or given a new XP value per interaction by the member.

Level up notifications can either be sent in a specific channel on your server or in direct messages.

### Manage XP

You may use the ;xp command to manage XP for members. You must have the manage server permission to use this command. You may also delete members from the leaderboard or reset the whole server's XP using the leaderboard if signed in with the manage server permission.

### Member Profiles

You can check your profile using ;profile and someone else's by using the command followed by mentioning the other member (;profile @friend). The profile shows the progress you have to the next level, your rank, level, and bot badges.

Currently, only chosen users can customize their profile backgrounds. This is not available publicly.

Medal
Crown
Booster
This badge is rewarded when you are rank 1 on the server
You can find your server's leaderboard using the ;leaderboard command. Members can have the same rank as other members if they have the exact same amount of XP.