- InviteManager Webhook Feature
- Give a role when user reach n invites
- Easy Management
- Add, remove & list reward roles
This bot mainly uses Alert Invites feature of the InviteManager bot to work.
So before you start this bot, consider the following requirements:
- Alert Invites Webhook needs to be set to the webhook url of this bot.
This is necessary because that is how this bot knows when a new alert invite has been triggered,
this can be set by doing the following command: /alert-invites webhook url http://my-webhook.net
You can also test if this bot is receiving the requests correctly by doing /alert-invites webhook test
, after doing this command you should receive a new alert-invite in this bot (if works).
- All reward roles configured in this bot have to be configured as alert invites in the InviteManager bot.
This is necessary because the InviteManager only sends alert-invites that are configured. e.g. if you set a reward role at 10 invites in this bot, but in the InviteManager you only have 15 invites set as alert-invite, InviteManager will not request your webhook url when someone gets 10 invites in your server.
The installation steps are as follows:
- Make sure to get Python 3.8 or higher
- Install dependencies, doing,
pip install -U -r requirements.txt
- Create the database in PostgreSQL.
You will need PostgreSQL 9.1 or higher,
type the following in the
psql
tool:
CREATE ROLE InviteManager WITH LOGIN PASSWORD 'your-password'; -- Creating a role with a password
CREATE DATABASE AlertInvitesEx OWNER InviteManager; -- Creating the database, and give the role above ownership
For the configuration rename the file configs.py.example
-> configs.py
, and then fill in all the requested data in the file configs.py
.
Now for the best part, running, for that we have to start by setting up the database, i.e. creating all the tables needed for the bot to work. To do so, do the following commands:
C:\Windows> py . db init
Linux@InvMan:~$ python3 . db init
Now with all the database creation done, we can start this bot, for this do the following commands:
C:\Windows> py .
Linux@InvMan:~$ python3 .
And... that's it. Now you should be running the bot.
This bot only uses slash commands, this means that to appear the commands in all guilds those commands will have to be synchronized with the discord API, to do the (global, i.e. all guilds) synchronization just do the following command: @BotPing sync