Skip to content

Thunder-Blaze/Cp_Discord_Bot

Repository files navigation

CP Discord Bot in Node JS

Overview

  • Currently Supports Codechef and Codeforces
  • This bot fetches user data from cp platforms and display it on discord.
  • This bot also verifies Codeforces & CodeChef users on Discord by checking their submissions and assigning them roles based on their titles.

Features

Codeforces

  • Users can verify their Codeforces account using /cfverify <handle> and get assigned the respective rank role.
  • You can fetch Codeforce's Profile's Image using /cfuserpfp <handle>.
  • Retrieves and displays Codeforces user stats via /cfuserinfo <handle>.
  • Retrieves Detailed Data about Solved Questions by the user using /cfusersolved <handle>.

CodeChef

  • Users can verify their CodeChef account using /ccverify <handle> and get assigned the respective rank role.
  • You can fetch Codeforce's Profile's Image using /ccuserpfp <handle>.
  • Retrieves and displays user stats via /ccuserinfo <handle>.

Screenshots

Installation

Requirements

  • Node.js
  • Required Node packages (listed in package.json)
  • A Discord bot token

Setup

  1. Clone the repository:
    git clone https://github.com/Thunder-Blaze/Cp_Discord_Bot.git
    cd Cp_Discord_Bot
  2. Install dependencies:
    npm install
  3. Create a .env file and add:
    BOT_TOKEN=your_discord_token_here #important
    GUILD_ID=your_discord_server_id #important
    CLIENT_ID=your_discord_bot_client_id #important
  4. Install Commands in Server:
    node run deploy
  5. Run the bot:
    node run start

Docker Deployment

Build and Run with Docker

  1. Build the Docker image:
    docker build -t cp-discord-bot .
  2. Run the container:
    docker run -d --env-file .env cp-discord-bot

Caution

  • Ensure your .env file contains a valid Discord bot token.
  • The bot requires proper permissions to assign roles in your Discord server.

Info

About

A Bot made with Discord.js to fetch user data from the platforms like Codechef and Codeforces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published