Skip to content

A discord bot that uses Spring and JDA to alert students when assignments and classes are happening

License

Notifications You must be signed in to change notification settings

day-mon/Schoolbot-kt

Repository files navigation

Schoolbot-kt

GitHub issues GitHub GitHub last commit GitHub top language

Schoolbot-kt is a Kotlin rewrite of Schoolbot, a Discord bot that provides helps college students manage their school life.

Features

Installation

Requirements

  • Java 17 or higher
  • Gradle 4.10.2 or higher
  • A Discord bot token
  • Any Database supported by JDBI

Setup (Non-Docker)

  1. Clone the repository
  2. Create a file called schoolbot_cfg.json in the root directory. Example below:
{
    "token" : "YOUR_TOKEN_HERE",
    "developerIds" : [ "" ],
    "logLevel": "INFO",
    "pittToken": ""
}
  1. Create a file called application.properties in the root directory. (You can also find an example in the resources folder of this repo) Example below:
spring.datasource.hikari.pool-name=Schoolbot Connection Pool
spring.datasource.hikari.connection-timeout=
spring.datasource.hikari.maximum-pool-size=
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.properties.hibernate.dialect=
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=
spring.jpa.properties.hibernate.jdbc.batch_size=100
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
  1. Run gradle build to build the project
  2. Run gradle run to run the project
  3. Invite the bot to your server

Setup (Docker)

  1. Download the docker-compose.yml file from the repository
  2. Create a file called schoolbot_cfg.json in the root directory. Example below:
{
    "token" : "YOUR_TOKEN_HERE",
    "developerIds" : [ "" ],
    "logLevel": "INFO",
    "pittToken": ""
}
  1. Create a file called application.properties in the root directory. (You can also find an example in the resources folder of this repo) Example below:
spring.datasource.hikari.pool-name=Schoolbot Connection Pool
spring.datasource.hikari.connection-timeout=
spring.datasource.hikari.maximum-pool-size=
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.properties.hibernate.dialect=
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=
spring.jpa.properties.hibernate.jdbc.batch_size=100
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
  1. Run docker-compose up -d to start the bot
  2. Invite the bot to your server

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Apache 2.0

About

A discord bot that uses Spring and JDA to alert students when assignments and classes are happening

Topics

Resources

License

Stars

Watchers

Forks