Hweplir is a self-hosted bot that I created for personal servers, comprises of some basic CTF management commands (mainly for display CTFs info, fast create/delete with CTFTime API integration, auto hide/view CTF discussion Categories).
This bot makes use of the new Discord slash command and Buttons using discord.py
2.0!
Contribution and suggestion is highly welcome:)
First, head to Discord's Developer Portal, and create a new Application.
Next, config your bot information in the General Information
and Bot
section.
Note: make sure to enable all Intents + Copy the bot's TOKEN
and store it somewhere safe for now.
Finally, go to OAuth2/URL Generator
and generate a bot invite url, then add the bot to your server!
First, clone this repository:
git clone https://github.com/qhwi/Hweplir
- discord.py 2.x
pip install discord.py
- Python 3.8 or newer
Hweplir requires some secret environment variables:
TOKEN=
SERVER_ID=
Copy your saved bot's TOKEN and ID of the desired server, to create .env
file that defined the required variables.
Alternatively, you can just replace the value directly in main.py
:P
Finally, create a role named <<<VIEW_ALL_CTF>>>
in your server. Copy the Role ID and replace it in main.py
. Also assign this role to your bot.
Install Flask:
pip install Flask
Add to main.py
these lines at the top:
from keepalive import keep_alive
keep_alive()
Run main.py
as normal. Then use services such as UptimeRobot to ping the web app every 5 minutes:)
Note: Instead of create .env
file, simply create new Secret for TOKEN
and SERVER_ID
.
To show commands list, use /help
. To read command's description and required variables, just type /
and scroll through each.
[To be Updated]