Skip to content

Vicbrill44/UDSageDiscussion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,291 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Discussion Bot for the UDCIS Discord

My Skills

Description

This project is a Senior Project designed to implement discussion boards into the UDCIS Discord server. This is a way for courses to remove third party software and have everything ran on UD servers, specifically made for UD courses. Using Discord forum channels and linking the UDCIS Discord Bot, we've been able to localise a discussion board system in Discord where all interactions are done in Discord or on the linked database. This add-on to the current bot (Sage) supports weekly scoring periods, requirements for posts, access to individual scores, specific scoring mechanics, AI feedback, and reactions to posts to boost scores (among other features).

Installation

Follow these steps to set up and run the Discord discussion bot.

Prerequisites

Before proceeding, ensure you have:

  • Node.js installed (recommended version: 18.20.4 or higher).
  • Git installed on your machine.

1. Clone the Repository

Clone the repository using HTTPS or SSH:

git clone https://gitlab.eecis.udel.edu/cisc-capstone-teams/2024-2025/team-18/nazim-discord-discussion-bot.git

Navigate into the project directory:

cd nazim-discord-discussion-bot

2. Install Sage

This bot requires Sage to run locally. Follow the instructions in this guide to install Sage on your machine.

3. Install Dependencies

Run the following command to install all required dependencies:

npm install
npm install discord.js

4. Run the Bot

Move into the sagefork directory and start the bot:

cd sagefork
npm run build
npm run start

Common Issues & Troubleshooting

If you encounter an error related to missing canvas dependencies in Node.js, install it manually:

npm install canvas

If you make any changes related to MongoDB in the code, you may need to run the following command:

npx tsc

Then, retry running the bot.

Usage

This Discord bot encourages students to post high-quality, well-researched, and source-supported discussions in designated channels on the CIS Discord server. It provides instant AI-generated feedback on clarity, argument strength, and source credibility, helping students refine their contributions in real time. By fostering critical thinking and engagement, the bot enhances discussion quality and promotes deeper learning.

Support

If you need help with Sage or encounter issues, refer to the original README for additional documentation and troubleshooting steps.

Our Story

This project was set out to be built on top of Sage, creating an AI-powered Discord bot designed to enhance student engagement and streamline moderation within UD’s CIS community. Over the course of development, we balanced low-level setup, high-level API integration, and collaborative best practices to deliver a robust, maintainable solution.

Setting Up the Environment

One of the earliest and most significant hurdles was establishing a working development environment. With limited external documentation and support, each team member had to independently navigate a sprawling codebase. Configuring dependencies and managing frequent errors often led to situations where the application refused to run, despite all apparent fixes. These frustrating moments were valuable, though—they pushed us to develop a deeper understanding of the system’s architecture, which paid off as development progressed.

Building Access Control

Securing administrative features was one of our first development goals. Implementing robust access control was not trivial; it required a nuanced understanding of role-based permission handling within the Discord framework. Through active peer collaboration and code review, we iteratively refined these mechanisms to ensure users only accessed what they were authorized to. This process served as an important lesson in integrating secure design principles early in development.

Integrating the Language Model

Working with the language model presented its own set of technical challenges. A primary obstacle was achieving output formatting consistency across different interfaces. The solution came in the form of adapting the model’s output to a more structured format—one that was easier to parse and integrate. While the language model now functions reliably in most environments, certain testing setups still present connection difficulties. Nonetheless, the promise and impact of this feature remained a source of excitement throughout development.

Learning a Complex Codebase

A recurring challenge for all team members was the steep learning curve of adapting to an existing, complex codebase. Balancing feature implementation with maintaining compatibility required patience, adaptability, and consistent communication. Whether implementing a new command or fixing a subtle bug, each task demanded a broader understanding of how components interconnected—a challenge that fostered both technical growth and stronger team cohesion.

A Debugging Milestone

Perhaps one of the more humorous memories from development came when the bot mysteriously stopped working following changes to the MongoDB configuration. Panic set in as we all scrambled for answers, experimenting with possible fixes. In a twist of luck, one team member ran npx tsc, a TypeScript compilation command—and miraculously, the system came back to life. It was a light-hearted reminder that in software development, even the smallest oversight (or moment of luck) can make all the difference.

Looking Ahead

Our team remains dedicated to the continued development and refinement of this project. We believe in its potential to positively impact the computer science curriculum and are committed to addressing any remaining challenges and exploring future enhancements, hopefully with fewer random terminal command discoveries needed!

Authors and acknowledgment

Made by Ryan Dahlke, Mike McCully, Aidan Bell, Connor Klosowski, Victor Vasquez, Joey Blair, Zonglin Wu, Dustin Stark, Melvin Rau, Rylan Conley, Brett Bockstein.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors