CTF-Tracker-BOT is a powerful and efficient Discord bot that provides real-time updates and insights on Capture The Flag (CTF) events, directly integrated with CTFtime. It enables users to track upcoming CTF events, view detailed information about teams, and even compare performance across multiple teams. Perfect for competitive CTF participants and organizers alike, this bot simplifies tracking and management of CTF competitions.
- Real-Time CTF Updates: Get the latest upcoming CTF events from CTFtime.
- Team Information: Retrieve detailed information on teams, including their rank, points, and history in previous events.
- Team Comparison: Compare multiple teams' performances based on their most recent 5 CTF events.
- Command List:
/help
: Displays available bot commands./newctfs
: Lists the top upcoming CTF events with flexible sorting options./teaminfo
: Fetches detailed information about a specific team by name or ID./setteams
: Allows admins to set a list of teams to be used in the/compare
command./compare
: Compares pre-set teams' performances in their latest 5 CTF events.
- Node.js: Ensure you have Node.js installed.
- Discord Bot Token: You need a valid Discord Bot Token. Follow this guide to create a bot.
- CTFtime API: This bot relies on the CTFtime API to fetch event and team data.
-
Clone the Repository
git clone https://github.com/TheLeopard65/CTF-Tracker-BOT.git cd CTF-Tracker-BOT
-
Install Dependencies The bot uses
discord.js
,node-fetch
, andnode-cache
for its core functionality. Install all dependencies with npm:npm install
-
Create
.env
File In the root directory of the project, create a.env
file and add the following:TOKEN=your-discord-bot-token
-
Start the Bot Run the bot using Node.js:
npm start
-
Bot Commands Once the bot is running and added to your server, use the commands below:
/help
: Displays a help message with all available bot commands./newctfs [count] [sort]
: Fetches and displays upcoming CTF events. You can specify how many events to show and the sorting criteria (e.g., "weight", "start", "end")./teaminfo [teamid]
: Fetches information about a specific team by either name or ID./setteams [team1,team2,...]
: Set the list of teams to be used for comparisons in/compare
./compare
: Compares the top 5 CTF scores of the teams you've set with/setteams
.
Feel free to contribute to this project by forking the repository, making changes, and submitting a pull request. Please ensure all code is properly tested before submitting.
To install the necessary dependencies, run:
npm install
To run the bot locally, use the following command:
npm start
Currently, there are no formal tests in place. To add tests, consider using libraries like Jest or Mocha.
- CTF-Tracker.js: Main bot file handling logic, commands, and API calls.
- package.json: Manages the bot's dependencies and scripts.
- .gitignore: Specifies which files and folders to ignore for Git.
- .nixpacks: Configuration file for deployment on Nixpacks.
If you encounter any issues, feel free to open an issue on the GitHub issues page. We'll do our best to resolve them promptly.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Discord.js: For providing the necessary framework to interact with Discord's API.
- CTFtime: For providing the CTF data API.
For any support or questions, feel free to reach out via the GitHub discussions page or create an issue.
- Leopard (@theleopard65): The creator and maintainer of the CTF-Tracker-BOT.
Thank you for using CTF-Tracker-BOT! Enjoy tracking your favorite CTF events! 🎉