/discord_ctfbot

This bot is designed to fetch ctftime.org events and updates a text-channel in your Discord server. This bot also supports commands that can be sent in chat.

Primary LanguagePythonMIT LicenseMIT

Discord CTFBot

Introduction

This bot is designed to fetch ctftime.org events and updates a text-channel in your Discord server.

Requirements

Get Started

  1. Clone this repository
  2. Create a bot with Discord here and copy the private token:

    image

⚠️⚠️⚠️KEEP YOUR TOKEN PRIVATE⚠️⚠️⚠️


  1. In order to send CTF updates to your Discord server, you will need a designated #text-channel for the bot. Before you are able to get the text-channel ID needed for the bot, you will need to enable Developer Mode through your Discord settings:

    image

  2. Once Developer Mode is enabled, right-click on the text-channel you want the bot to send updates to and select Copy ID:

    image

  3. Open up src/pwnbot.py in your desired text editor and set the values for BOT_TOKEN and BOT_CHANNEL with your own token and bot channel ID:

    image

Note: TOKEN is a string and BOT_CHANNEL is an integer.


  1. After saving src/pwnbot.py, you will need to run the following command in this repository:
$ docker build -t discord .
  1. Finally, you can run this last command to run the Docker image and have it running in the background of your server:
$ docker run discord &
  1. You should now be able to run !help to get started. 🤖

Bot Commands

Usage: !<command>

Event Commands:
 * !events - Displays ongoing ctf events within the week.
 * !events all - Displays ctf events for the past and next week.
 * !events next - Displays upcoming ctf events for next week.
 * !events past - Displays finished ctf events from the past week.

Clear Commands:
 * !clear - Clears the last 20 messages from pwnbot in current channel.
 * !clear all - Clears all messages from pwnbot in current channel.
 * !clear last - Clears last message from pwnbot in current channel.

Util Commands:
 * !ping - Checks the latency for pwnbot with date/time

Misc Commands:
 * !celebrate - Celebration!!
 * !facepalm - Sometimes you just have to facepalm ...