Skip to content

cuhacking/watershed-discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

yarn install

Create .env file:

TOKEN=<XXX>
GUILD_ID=<XXX>
RAVENS_QUEST_API=https://dev.cuhacking.com/api/ravensQuest/

Token can be found in the Discord developer portal, go to the app, then go to the "Bot" tab.

Role is the id of the role to give out and the guild is the discord server id.

Running

yarn start

Endpoints

Make an announcement

POST /announce

{
  "message": "This is an announcement",
  "channel": "announcements"
}

Or use channel id

{
  "message": "This is an announcement",
  "id": "691816726148677636"
}

Response (200)

{
  "status": "SUCCESS",
  "message": "This is an announcement",
  "channel": "announcements"
}

Not found (404)

{
  "status": "NOT FOUND",
  "channel": "announcements"
}

Give a user the hacker role

POST /upgrade

{
  "user": "Test#0021",
  "roleId": "123456789"
}

or use ID POST /upgrade

{
  "id": "147468550859908096"
}

Response (200)

{
  "status": "SUCCESS",
  "user": "Test#0021"
}

Not found (404)

{
  "status": "NOT FOUND",
  "user": "Test#0021"
}