- JDK 21
- Maven 3
- Spring Boot 3
- Spring JPA
- MariaDB 10
- discord4j (version: 3.2.7-SNAPSHOT commit b476687 required for Polls, released version does not include)
- Clone and checkout commit id b476687 from the 3.2.x branch: https://github.com/Discord4J/Discord4J
- ./gradew publishToMavenLocal
- Update this project's pom.xml Discord4j with the SNAPSHOT version published
- flyway db version management
- /config spring bean configurations
- /discord the bot's listeners
- /model classes persisted to DB
- /repository JPA database interfaces
- /security access control by discordId and services
- /service wrapper around databases with access control and input/output validation
- SdcsDiscordBotApplication - the main class
DISCORD_TOKEN - get from https://discord.com/developers/applications (Each bot needs to be a separate application with different token) DISCORD_SERVER_ID - get from Discord client DISCORD_CHANNEL_ID - the #officers text channel id
- Administrator (TODO: tighten security)
mvn clean install spring-boot:repackage
java -jar target/DiscordClubBot-0.0.1-SNAPSHOT.jar
Or using IntelliJ, just press the green Play button next to DiscordClubBotApplication.main()
- Use gitflow
- Git branches:
- master - mainline stable branch, latest released production code
- hotfixes/HOTFIX_NAME - branched from master, contains fix for production code
- development - mainline stable branch, latest development code
- features/FEATURE_NAME - branched from development, brand new feature
- releases/VERSION - working branch to merge release code, typically development onto master
- tags/VERSION - stable release candidate for production
- Clone this repo.
- Fetch all remotes.
- Update local development.
- Checkout feature/branch from development.
- Add new classes to model:
- nouns = classes
- attributes = member variables
- verbs = methods
- Create JPA repositories for any new classes
- Create Spring service that performs actions (create/read/update/delete objects of your classes)
- Add message listener(s) that calls the Spring services
- Commit your changes.
- Push your changes.
- Create a pull request onto development.
- Make sure JAVA_HOME environment variable matches the jdk you are using to build and run your project.
- Merge development branch with master
- Checkout development branch
- Note that latest jgitflow plugin is compiled with old ssl libs so it cannot communicate with github over ssh, so you must use https with your github username and github personal access token
- mvn jgitflow:release-start -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.0.1-SNAPSHOT -Dusername=$GITUSER -Dpassword$GITTOKEN
- mvn jgitflow:release-finish -Dusername=$GITUSER -Dpassword$GITTOKEN
- camelCase classes and variables
- Capitalize class names
- lowercase first letter of object names
- Singular class names
- Plural database table names
| Command | Description | Example |
|---|---|---|
| !user list | Lists all users | |
| !user info | Gets user information | |
| !user edit | Edit user information |
| Command | Description | Example |
|---|---|---|
| /membership | Start registration |
| Command | Description | Example |
|---|---|---|
| !meeting list | Lists detail of all active and scheduled meetings. | |
| !meeting log | Gets log of all members who attended a specific meeting. | !meeting log [meeting_id] |
| !meeting show | Shows details of a specific meeting. | !meeting show [meeting_id] |
| !meeting remind | Manually sends meeting reminders. | |
| !meeting id | Lists IDs of meetings completed, scheduled, or active. | |
| !meeting link | Lists all active and scheduled meetings with their agenda and minutes links. | |
| !motion | Motions vote on meeting or minutes. | |
| !nominate | Nominate an active user (required second) for officer position. | !nominate <@user> [role] |
| !nominate list | Lists the list of nominated users & respected roles | |
| !nominate drop | Drops nomination of user. Can only be done by nominee themselves (& select roles) |
| Command | Description | Example |
|---|---|---|
| /rollcall | Starts a roll call poll for the current active meeting |