https://github.com/adwerygaming/amikom-class-notifier
Get notified when class is about to start via Discord!
https://github.com/adwerygaming/amikom-class-notifier
amikom amikomone discord-bot discord-js diy pooling scripts
Last synced: about 1 month ago
JSON representation
Get notified when class is about to start via Discord!
- Host: GitHub
- URL: https://github.com/adwerygaming/amikom-class-notifier
- Owner: adwerygaming
- Created: 2026-03-14T06:49:43.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-04T08:06:15.000Z (3 months ago)
- Last Synced: 2026-04-04T08:26:04.421Z (3 months ago)
- Topics: amikom, amikomone, discord-bot, discord-js, diy, pooling, scripts
- Language: TypeScript
- Homepage:
- Size: 1.65 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Features

- **Today & Weekly Schedule** — View your class schedule (same as [AmikomOne App](https://play.google.com/store/apps/details?id=com.ic.projectabsensi&hl=id&pli=1))
- **Class Reminders** — Get notified before class starts
- **Self-hosted** — Full control over your data and deployment
## How It Works
A Discord bot that automates class reminders by syncing schedule data with real-time events.
| Component | Description |
|-----------|-------------|
| **Data Ingestion** | Schedule data is imported manually via the Amikom student dashboard API and stored as a static JSON file |
| **Polling** | Continuously monitors the schedule file, calculating time differences between current time and upcoming classes |
| **State Management** | Redis stores notification state to prevent duplicates across application restarts |
| **Event Driven** | Redis Pub/Sub decouples the system; events are published when classes are imminent |
| **Subscribers** | Redis subscribers query PostgreSQL for active guild subscriptions and send notifications to Discord channels |
## Try It Yourself
> [!CAUTION]
> **This bot and project are not affiliated with, endorsed by, or officially connected to Universitas Amikom Yogyakarta**. It is a community-built tool created by students, for students.
> **Use at your own risk.** For official academic information, always refer to [Dashboard Mahasiswa](https://mhs.amikom.ac.id) or [AmikomOne App](https://play.google.com/store/apps/details?id=com.ic.projectabsensi&hl=id&pli=1).
### Option 1: Use the Public Bot (Recommended)
You can invite the bot to your server using this button below:
After that, see the [Subscribe to Reminders](#subscribe-to-reminders) section.
### Option 2: Self-Host
If you want to build this project yourself, see the [Self Hosting](#self-hosting) section below.
## Usage
### Importing Schedule Data
1. Log in to [Dashboard Mahasiswa](https://mhs.amikom.ac.id)
2. Once logged in, open [this URL](https://mhs.amikom.ac.id/api/perkuliahan/jadwal_kuliah_personal)
3. You should see JSON data. If not, ensure you're using the same browser session
4. Select all and copy the JSON (`Ctrl+A` then `Ctrl+C`)
5. Paste into a text editor and save as `schedule.json`
6. In your Discord server, run: `/schedule set`
7. Enter schedule information and upload the `schedule.json` file when prompted
8. Verify the schedule preview appears
### Subscribe to Reminders
1. In your Discord server, choose a channel for notifications
2. Run: `/reminder subscribe`
3. The bot will ask you to input your **Major**, **Enrolled Year**, and **Class Number**.
4. Done! You'll now receive class reminders
### Managing Reminders
- **Unsubscribe:** `/reminder unsubscribe`
- **Check status:** `/reminder status`
### Checking Schedules
- **Today's Schedule:** `/schedule today`
- **Weekly Schedule:** `/schedule weekly`
## Self-Hosting
### Prerequisites
- **Node.js** v21 or higher
- **npm** v9 or higher
- **Docker** & **Docker Compose** installed
- **Git**
### Requirements
- Discord account with server admin privileges
- An Amikom account (NPM & password)
- Server/PC capable of running 24/7 (for continuous notifications)
## Setup
> [!NOTE]
> Follow these steps in order.
1. Create a Discord Bot
1. Navigate to the [Discord Developer Portal](https://discord.com/developers/applications)
2. Log in with your Discord account
3. Click **New Application** (top-right) if you haven't created a bot yet
4. Enter your **Application Name**
5. Copy the **Application ID** from the application page
6. Go to the **Bot** section (left sidebar)
7. Under **Token**, click **Reset Token** and copy the new token
8. Navigate to **Installation** (left sidebar)
9. Under **Installation Contexts**, select **Guild Install**
10. For **Install Link**, choose **Discord Provided Link** and copy the URL
11. Under **Default Install Settings > Guild Install**, add `applications.commands` and `bot` to **Scopes**
12. Save changes and open the invite URL
13. Select your server to add the bot
> [!IMPORTANT]
> **You'll need:** `DISCORD_CLIENT_ID` (Application ID) and `DISCORD_TOKEN` (Bot Token)
2. Deploy the Bot
```
# Clone the repository
git clone https://github.com/adwerygaming/amikom-class-notifier
cd amikom-class-notifier
# Copy and configure environment variables
cp .env.example .env
# Edit .env with your credentials (see below)
# Start infrastructure services
docker compose up -d
# Build and start the bot
npm run build
npm run start
```
#### Environment Variables (.env)
```
NODE_ENV=production
# Discord (from step 1)
DISCORD_CLIENT_ID=your_application_id_here
DISCORD_TOKEN=your_bot_token_here
# Redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
# PostgreSQL
POSTGRES_PORT=5432
POSTGRES_PASSWORD=your_secure_password_here
# PGAdmin (optional, for database management)
PGADMIN_PORT=8080
PGADMIN_PASSWORD=your_secure_password_here
# Connection string (update with your credentials)
PG_CONNECTION_STRING=postgresql://postgres:your_secure_password_here@localhost:5432/amikom_notifier
```
> [!TIP]
> Generate fast, secure passwords using [it-tools.tech/token-generator](https://it-tools.tech/token-generator)
After that, go to the [Importing Schedule Data](`#importing-schedule-data`) section to import your schedule and the [Subscribe to Reminders](`#subscribe-to-reminders`) section to set up your reminders.
## Development
```
# Install dependencies
npm install
# Run in development mode (with hot reload)
npm run dev
# Lint code
npm run lint
```
## Contributing
Contributions are open to everyone. If you implement something cool and useful, open a PR and we'll discuss it there. ❤️
## Contact
If you have any questions, feel free to reach out via links on my [GitHub profile](https://github.com/adwerygaming)
This project is not affiliated with Universitas Amikom Yogyakarta