Skip to content

UniversityOfHelsinkiCS/cs-discord-bot

Repository files navigation

CS DISCORD BOT

Testing pipelinecodecovMIT license

Helsinki University software production project, fall 2021

This project implements a discord bot. Bot´s function is to aid students to find the right course channels in discord, where they can ask for help and communicate with other students. For faculty it provides tools to control course information and other features.

Documentation

User manual (student)

User manual (faculty)

Project progress

Developer links

CI/CD Pipeline

Instructions

Clone repository to your computer.

Install all dependencies npm install.

Add .env file to root of the repository (same directory with package.json).

Add following contents to .env file:

PREFIX=!
DISCORD_BOT_TOKEN=your-own-token
GUILD_ID=your-discord-server-id
BOT_ID=id-of-your-bot
CLIENT_SECRET=your-client-secret
DISCORD_REDIRECT_URL=your-client-oauth2-redirect-url-with-identyfy-guilds.join
DISCORD_SERVER_INVITE=your-discord-server-invite
DISCORD_WEBHOOK_URL=discord-webhook-used-in-fullstack-open-course
DISCORD_WEBHOOK_TOKEN=token-for-the-discord-webhook
PORT=your-custom-backend-port
SESSION_SECRET=server-session-secret
BACKEND_SERVER_URL=backend-server-url-without-port
DATABASE_URL=postgres-connection-string (eg. postgres://postgres:postgres@localhost:5432/postgres)
GRAFANA_TOKEN=your-grafana-authorization-token
GRAFANA_URL=your-server-url/grafana/your-dashboard-specific-stuff
GRAFANA_PANEL_ID=your-grafana-panel-id
PAPERTRAIL_URL=papertrailapp-url
WORKSHOPS_API=pajat-api-url

# Bridge
TELEGRAM_BOT_TOKEN=telegram-bridge-bot-token
TG_BRIDGE_ENABLED=true

Setup config.json file:

courseAdminRole: course-admin-role-name
facultyRole: teacher-role-name

Make your own Discord Server. You can find instructions here.

Make your own Discord Bot. You can find instructions here.

Download and install PostgreSQL here.

More help for PostgreSQL (in Finnish) here.

Setting up the backend here.

Running bot in command line

Run one of the following commands to start bot:

npm run dev (for development vesion)
npm start (for staging version)
npm run test (run all the tests)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Languages