How Discord works

Server, channel, role, and permission: the four components that determine what a bot can do. Everything you need to know before setting up Aegis.

Documentation / Basics / How Discord works

  1. A server is a home

    Every community is a server. It has rooms (channels) and room groups (categories) inside.

  2. Roles are key

    Roles and permissions determine who can see which channel and what they can do.

  3. Order matters

    A member or bot can only manage roles below its own highest role.

Every community on Discord is a server. Inside the server, there are channels, categories that group channels, members, and roles. The answer to the question of who can see what and who can do what is hidden in roles and permissions. Bots are subject to the same rules: a bot cannot go beyond the permissions you give it.

Server, channel, and category

The list on the left is the map of the server. Channels sit under categories; permissions given to a category pass down to channels under it unless specified otherwise.

Server
The community itself. It has an owner, and the owner can do anything.
Text channel
The room where messages are written, e.g., #general. Bots also write log messages to text channels.
Voice channel
Voice chat room. Music bots and voice logs work here.
Category
Header grouping channels, e.g., aegis-logs. Permissions can also be granted at the category level.

Roles and permissions

A member's permissions are the sum of the permissions of all the roles they have. Also, every channel can turn permissions on or off for specific roles: for example, log channels are closed to everyone, open only to administrators.

Administrator
Grants all permissions and bypasses channel restrictions. This is the recommended permission for Aegis to work fully.
Manage Channels
Channel creation, deletion and editing. /setup creates channels with this permission.
Manage Roles
Assigning and removing roles. Anti-Nuke strips the attacker's roles with this permission.
Ban Members
Ban and kick. Punishment commands require this permission.
Manage Messages
Deleting others' messages. AutoMod deletes offensive messages with this permission.

Role order

The order in the Server Settings > Roles list is a true hierarchy of permissions. A member or bot can only manage roles and members below their own highest role. The server owner is always at the top.

  • Move the Aegis role to the top of the list, just below the server owner. Otherwise, Aegis cannot intervene with someone with a higher role than itself.
  • If you are wondering why a bot cannot do something, check the role hierarchy first, then the permissions.

Message, embed and interaction

The colorful, titled cards sent by bots are called embeds. The buttons and dropdown menus under messages are interactions: when clicked, a signal is sent to the bot. Some responses are visible only to the person who typed the command; Discord indicates this with an "Only you can see this" note.

  • Aegis's log messages are embeds: the color on the left edge shows the type of event, and the fields show the details.