A Discord Bot for managing mentionable roles within your server. This removes the need for the annoying everyone role but still allows for groups of users to be mentioned.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
At Me Bot
.gitignore
At Me Bot.sln
LICENSE.md
README.md

README.md

At Me Bot

This is a discord bot for managing mentionable roles within your server

The basics

This bot creates roles within your server which people can subscribe themselves to in order to be notified when the role is mentioned as an alternative to the @everyone mention. Roles managed by this bot are refered to as subscriptions.

An example could be a subscription called News. Users can subscribe to it by using the command !subscribe news and then will be notified whenever another user types @news.

Subscriptions can also be marked as default. Whenever a user joins the server they are automatically given all default subscriptions.

A great example use of this is to create a subscription called everyone and set it to default. This new subscription will overwrite the normal @everyone role making the original unusable. As this new role is set to deault it will function exactly like the original @everyone role except users can remove themselves from it using !unsubscribe everyone.

Commands

  • To subscribe to a subscription:
    • !subscribe <SUBSCRIPTION NAME>
    • !sub <SUBSCRIPTION NAME>
  • To unsubscribe from a subscription:
    • !unsubscribe <SUBSCRIPTION NAME>
    • !unsub <SUBSCRIPTION NAME>

Config Files

The subscriptions the bot manages are controlled from a config file called Bot.json. This will be created for you the first time you run the bot; it will look like this:

{
  "Token": null,
  "Game": null,
  "Subscriptions": null
}

The Token needs to be set to your Discord bot account's Token.
The Game is optional and is what your bot will show as 'playing'.
The Subscriptions is all the subscriptions your bot will control.

A subscription take the following JSON form:

{
  "Name": "Admin News",
  "IsDefaultRole": false,
  "RolesToSubscribe": [
    "admin",
    "moderator"
  ]
}

The Name is the name of the role that will be created as well as what users will type in their commands. The commands are not case-sensitive but the role-creation is.
The IsDefaultRole decides if new users to your server will be automatically subscribed or not, if not set to true this can actually be removed from the subscription.
The RolesToSubscribe are pre-requisit roles a user needs to have inorder to be able to subscribe to this subscription. Note that a user only needs one of the RolesToSubscribe in order to qualify.
This is not optional: in order to allow anyone to use a subscription you need to include the @everyone role as the only RolesToSubscribe like so:

{
  "Name": "Admin News",
  "IsDefaultRole": false,
  "RolesToSubscribe": [
    "@everyone"
  ]
}

Note that this is the only RolesToSubscribe that needs the @ symbol to be included - this is exactly like the roles in your server settings:

Image showing an example of roles in a server

A fully-formed bot.json file might look something like this:

{
  "Token": "<BOT_TOKEN>",
  "Game": null,
  "Subscriptions": [
    {
      "Name": "everyone",
      "IsDefaultRole": true,
      "RolesToSubscribe": [
        "@everyone"
      ]
    },
    {
      "Name": "News",
      "RolesToSubscribe": [
        "@everyone"
      ]
    },
    {
      "Name": "Events",
      "RolesToSubscribe": [
        "admin",
        "member"
      ]
    }
  ]
}