Skip to content

It's A Discord Bot Made For The Competitive Programmers. That will Help To Track The New Events on CodeChef And CodeForces And A Virtual Compiler For C++ and Python To Test the programs And Much More.

Notifications You must be signed in to change notification settings

SalmanAd01/CP-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CP-Bot

  • It's A Discord Bot Made For The Competitive Programmers. That will Help To Track The New Events on CodeChef And CodeForces And A Virtual Compiler For C++ and Python To Test the programs And Much More.

Badges

python-version

Discord

CodeChefApi

CodeForcesApi

UptimeRobot

Twitter

LinkedIn

Features

  • Easy To Search The User's Info On CodeChef And CodeForces
  • Easy To Track The Current And Upcoming Events On CodeChef And CodeForces
  • Easy To See The Total Problems On CodeChef.
  • Virtual Compiler Of Python And C++.

How To Invite

  1. Paste The Link In The Browser Link:https://discord.com/api/oauth2/authorize?client_id=870861541862408252&permissions=0&scope=bot
  2. Select The Server From The Drope Down List On Which You Wanted To Invite The Bot

Screenshot (430)

  1. Click On Authorize Button

Screenshot (432)

How To Use

  • $csupcoming : This Command Is Used To Know The Upcoming Events With The Starting And End Date Of CodeChef
$csupcoming

Screenshot (446)

  • $cspresent : This Command Is Used To Know The Present Events With The Starting And End Date Of CodeChef
$cspresent

Screenshot (445)

  • $csuser : This Command Is Used To Know The Basic Information of a user In Codechef. It takes the username as a parameters
$csuser user_name

Screenshot (411)

  • $cscountproblem : This Command Is Used To Get The Total Problem in CodeChef with respective of there complexity.
$cscountproblem

Screenshot (414)

  • $csproblem : This Command Is Used To Get The Overall Submission status Solve By The User.It takes the user_name as a parameters.
$csproblem user_name

Screenshot (416)

  • $cfuser : This Command Is Used To Know The Basic Information of a user In CodeForces. It takes the username as a parameters
$cfuser user_name

Screenshot (418)

  • $cfupcoming : This Command Is Used To Know The Upcoming Events With The Starting And End Date Of CodeForces.
$cfupcoming

Screenshot (444)

  • $run : This Command Is Used To Run The Python and C++ Code It can Be Run With or Without Input.
  1. Without $input
$run
```Extension_name
Write_Code
```
  1. With $input
$run
```Extension_name
Write_Code
```
$input
```
Write_Input
```
  • Note: For Python Extension_name is py And For C++ It's c++

Demonstration Of $run command

  • For Python
  1. Without $input
$run
```py
import json
x={
"name":"Jhon",
"age":30,
"city":"New York"
}
y=json.dumps(x)
print (y) 
```

Screenshot (466)

  1. With $input
$run
```py
a = input()
b = input()
x = float(a) + float(b)
print(x)
```
$input
```
3
5
```

Screenshot (465)

  • For C++
  1. Without $input
$run
```c++
#include <iostream>
using namespace std;
int main()
{
for (int i=0;i<5;i++)
{
cout<<"Hello World\n";
}
return 0;
}
```

Screenshot (462)

  1. With $input
$run
```c++
#include<iostream> 
using namespace std; 
int main()
{
int a;
cin>>a;
for(int I=0;I<a;I++)
{
cout<<"Hey\n"; 
} 
return 0;
} ```
$input
```
10
```

Screenshot (460)

  • Note: Since It's A Discord Bot And Discord Will Not Allow To Send The Message That Having More Than 2000 Charecters.So Take That In consideration while using $Input

How To Get The Api's

  1. CodeForces
  • To Get The Api Of CodeForces Is Simple You Just Need To Login With Your Account Then Click of API Button You Will Find Your Api Token here : https://codeforces.com/settings/api
  • Click On Add Api Key Screenshot (435)
  1. CodeChef
  • To Get The Api of CodeChef You Need To Mail Them At api@codechef.com and Convey for what purpose you need there api
  • Then They Will Send One Form You Need To Fill That Form And Wait. Then You Will Get Mail From There Side And Now You Will Be Able To Get The API Token
  • Documentation https://developers.codechef.com/#grant-types

Contributor

About

It's A Discord Bot Made For The Competitive Programmers. That will Help To Track The New Events on CodeChef And CodeForces And A Virtual Compiler For C++ and Python To Test the programs And Much More.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages