Skip to content

Saving Re-write #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 125 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
f76c0ef
Renaming user settings internally
ParadauxIO Mar 28, 2021
9f6285e
Thought on moving permissions to guild settings entry
ParadauxIO Mar 28, 2021
29b7a6f
Guild Settings progress
ParadauxIO Mar 30, 2021
4fe83b9
Ensure messages expire, so we're not holding on to them longer than n…
ParadauxIO Mar 30, 2021
8b8c491
Registering new manager
ParadauxIO Mar 30, 2021
a21ceeb
Fix audit logging to be guild specific
ParadauxIO Mar 30, 2021
1596723
Add permission check to announcement command to prevent abuse
ParadauxIO Mar 30, 2021
3a03bd6
Remove command which has been waiting for impl for too long
ParadauxIO Mar 30, 2021
244c04d
DM command implemented
ParadauxIO Mar 30, 2021
de32dc3
Start moving permissions to per-server rather than global
ParadauxIO Mar 30, 2021
c0a0ea1
Remove obsolete debug outputs
ParadauxIO Mar 30, 2021
79921f0
Planning out setupcommand
ParadauxIO Mar 30, 2021
a184d81
Parse Boolean from text util
ParadauxIO Mar 31, 2021
b288f51
WIP commad to onboard new guilds
ParadauxIO Apr 24, 2021
d38bce3
WIP system to dynamically create discord voice channels as demand needs
ParadauxIO Apr 24, 2021
46af3c8
Make rolemanager more generic
ParadauxIO Apr 24, 2021
ef34db0
Register setup command
ParadauxIO Apr 24, 2021
b6573d9
Near-final GuildSettingsManager including cache
ParadauxIO Jun 9, 2021
bf89b8c
Charmander Command completed
ParadauxIO Jun 9, 2021
56598a2
Remove WIP task manager
ParadauxIO Jun 9, 2021
77e324f
Update amount of charmanders in the API
ParadauxIO Jun 9, 2021
871e55c
Finished placeholder setup command
ParadauxIO Jun 9, 2021
f6d0e36
Switched to chew's fork of JDA Utils, updated JDA
ParadauxIO Jun 9, 2021
8657d7f
Make message logs per-server
ParadauxIO Jun 9, 2021
7dedd04
Add guildExists
ParadauxIO Jun 9, 2021
f326c3f
Remove unimplemented private message listener
ParadauxIO Jun 10, 2021
bab8245
Moving counter to per-server
ParadauxIO Jun 10, 2021
50cf3e8
WIP Punishment manager to centralize punishment code
ParadauxIO Jun 10, 2021
6d74cc5
Move punishment commands to use new manager class
ParadauxIO Jun 10, 2021
d74bb57
Pass in channel to punishment manager
ParadauxIO Jun 10, 2021
88a3876
Fixed errors, made it server-specific
ParadauxIO Jun 10, 2021
4517d13
Moved incident and ticket IDs to a per-server basis
ParadauxIO Jun 10, 2021
0b21a00
Remove half-baked delwarning system
ParadauxIO Jun 10, 2021
3a4a0a8
deregister defunct punishment command
ParadauxIO Jun 10, 2021
5dd4458
Register permission manager
ParadauxIO Jun 10, 2021
8f8f707
Make per-server field in each database entry
ParadauxIO Jun 12, 2021
f73ef00
Update reference to tag entry
ParadauxIO Jun 12, 2021
0f1dc15
GuildId reference fix
ParadauxIO Jun 12, 2021
892c9c0
Bump slf4j-api from 1.7.30 to 1.7.32
dependabot[bot] Jul 20, 2021
05907ac
Bump slf4j-log4j12 from 1.7.30 to 1.7.32
dependabot[bot] Jul 20, 2021
b8fc665
Bump JDA from 4.2.1_267 to 4.3.0_300
dependabot[bot] Jul 30, 2021
6a99c6a
Merge pull request #79 from ParadauxIO/dependabot/maven/develop/net.d…
ParadauxIO Jul 31, 2021
0ad7ab3
Merge pull request #77 from ParadauxIO/dependabot/maven/develop/org.s…
ParadauxIO Jul 31, 2021
3d06201
Merge pull request #76 from ParadauxIO/dependabot/maven/develop/org.s…
ParadauxIO Jul 31, 2021
33ddf6f
Merge branch 'develop' of https://github.com/ParadauxIO/ComputerScien…
ParadauxIO Aug 1, 2021
6000122
New object-based approach for handling cached guilds
ParadauxIO Aug 1, 2021
3dfbada
Add codefactor badge
ParadauxIO Aug 1, 2021
486467e
Remove unicode escape
ParadauxIO Aug 1, 2021
1dbdac1
It compiles! (again, oops)
ParadauxIO Aug 1, 2021
f15cf25
Bump version to 2.0 ahead of the rewrite
ParadauxIO Aug 1, 2021
fc5597b
Add ebean unit testing DB
ParadauxIO Aug 1, 2021
229b44d
Removing duplicate files
ParadauxIO Aug 1, 2021
4bde4de
Add EBean
ParadauxIO Aug 1, 2021
a9038ce
WIP GuildCache
ParadauxIO Aug 1, 2021
8bad52d
WIP Migrating Locale System from other project
ParadauxIO Aug 1, 2021
820541c
Changing package structure
ParadauxIO Aug 1, 2021
531a83a
Remove TODO
ParadauxIO Aug 1, 2021
34cf887
Add configurate
ParadauxIO Aug 2, 2021
efe29f0
Restructured / Ebeanified Model
ParadauxIO Aug 2, 2021
8f5a7f2
Setup EBean tests
ParadauxIO Aug 2, 2021
27a9ec8
Remove unicode escape
ParadauxIO Aug 2, 2021
19959ba
Get guild from ebean
ParadauxIO Aug 2, 2021
91233f4
WIP EBean connection
ParadauxIO Aug 2, 2021
09296ac
Resolve (some) codefactor issues
ParadauxIO Aug 2, 2021
1aa1132
New configurate-based config system.
ParadauxIO Aug 3, 2021
68c100b
Load all guilds into cache on startup
ParadauxIO Aug 3, 2021
0b4042a
New application entry point
ParadauxIO Aug 3, 2021
72573a7
Custom Annotation-Driven Command Handler
ParadauxIO Aug 7, 2021
1479140
Fix missing semicolon + incorrect import
ParadauxIO Aug 7, 2021
ea4d6e4
Change main class to 2.0
ParadauxIO Aug 7, 2021
4cf98a3
Move images
ParadauxIO Aug 7, 2021
f1778a5
Remove obsolete commands
ParadauxIO Aug 7, 2021
9fc3deb
Pre-gradle push
ParadauxIO Aug 7, 2021
03d2a00
Convert to gradle
ParadauxIO Aug 7, 2021
3153822
Remove workflows
ParadauxIO Aug 7, 2021
590cb36
Move exportResource to a utility class
ParadauxIO Aug 7, 2021
de88516
Code cleanup
ParadauxIO Aug 7, 2021
b44d286
Cleanup / Code maturity
ParadauxIO Aug 7, 2021
accda02
Update legacy
ParadauxIO Aug 9, 2021
2d2a83b
Update PunishmentManager.java
ParadauxIO Aug 12, 2021
fd2406d
Add new runtime files to ignore list
ParadauxIO Aug 16, 2021
4868b31
Fix locale loading, save config on start
ParadauxIO Aug 16, 2021
148b284
Mark fields as nullable, remove transient root field
ParadauxIO Aug 16, 2021
85a7316
Update FConfigurationLoader.java
ParadauxIO Aug 16, 2021
c414a1d
Update PunishmentManager.java
ParadauxIO Aug 16, 2021
fbc2014
Fix https://github.com/SpongePowered/Configurate/issues/210
ParadauxIO Aug 17, 2021
10b9900
Stop saving on load
ParadauxIO Aug 17, 2021
9a5245a
Remove class from logger
ParadauxIO Aug 17, 2021
5182701
Add postgres as a dependency
ParadauxIO Aug 17, 2021
653d260
Moving data-related classes to their own root-level package
ParadauxIO Aug 17, 2021
3702902
Update imports
ParadauxIO Aug 17, 2021
540f64d
Register my command handler system
ParadauxIO Aug 17, 2021
86487ba
Update dependencies
ParadauxIO Sep 12, 2021
6069880
Fix path to QBean
ParadauxIO Sep 12, 2021
020ca0d
Fix nullable possibility
ParadauxIO Sep 12, 2021
90c8778
Guilds SQL
ParadauxIO Sep 12, 2021
ad573a6
Update postgres
ParadauxIO Sep 12, 2021
2165cc2
Move to core
ParadauxIO Sep 12, 2021
b7d87d1
Re-enable test
ParadauxIO Sep 12, 2021
f64fce4
Finished command lib
ParadauxIO Sep 12, 2021
561fe27
Add permissions built into commands, for external handling
ParadauxIO Sep 12, 2021
e921c45
Begin moving commands over
ParadauxIO Sep 12, 2021
2095335
Delete GuildCreationEvent.java
ParadauxIO Sep 12, 2021
2532fb5
Connect to database
ParadauxIO Sep 12, 2021
5909259
Update GuildSettingsTest.java
ParadauxIO Sep 12, 2021
9f269bf
Update CommandListener.java
ParadauxIO Sep 12, 2021
a88cfc4
Register commands
ParadauxIO Sep 12, 2021
1bd7106
Optimize imports
ParadauxIO Sep 12, 2021
deca3c2
Move into image package
ParadauxIO Sep 12, 2021
2bc9c19
Add alias support
ParadauxIO Sep 12, 2021
cbd3ccf
Imports
ParadauxIO Sep 12, 2021
72e85c8
Add default annotation
ParadauxIO Sep 12, 2021
2d7a054
Working on moving existing commands to new system
ParadauxIO Sep 12, 2021
3ccd287
XKCD command, move FGuild
ParadauxIO Sep 13, 2021
d786f81
registerCommand vararg
ParadauxIO Sep 13, 2021
eaefad3
Register commands
ParadauxIO Sep 13, 2021
05c83aa
Image and joke commands migrated to new system
ParadauxIO Sep 13, 2021
5587152
Progress push
ParadauxIO Sep 13, 2021
9ff91a3
Progress push on command migration + optimise imports
ParadauxIO Sep 19, 2021
226c877
Moving privileged commands into package structure
ParadauxIO Sep 19, 2021
740bc0e
New user schema
ParadauxIO Sep 19, 2021
fa4bfa8
User mapping
ParadauxIO Sep 19, 2021
0636de1
Temp test command
ParadauxIO Sep 19, 2021
9122e96
Commenting out broken code so it builds for now
ParadauxIO Sep 19, 2021
c840af6
Update gradlew permissions to allow execution
ParadauxIO Sep 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

File renamed without changes
34 changes: 0 additions & 34 deletions .github/workflows/maven.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Gradle
.gradle/
build/

# Unit testing
friendlybot.mv.db

# Runtime stuff
/*.json
src/test/resources/img*
friendlybot-locale.properties
friendlybot.conf

# Private tests
src/test/java/io/paradaux/friendlybot/managers/MailGunManagerTest.java
Expand Down
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Empty file removed Placeholders.md
Empty file.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# FriendlyBot
![Build](https://github.com/ParadauxIO/FriendlyBot/workflows/Build/badge.svg?branch=main)
[![CodeFactor](https://www.codefactor.io/repository/github/paradauxio/friendlybot/badge)](https://www.codefactor.io/repository/github/paradauxio/friendlybot)
![Version](https://img.shields.io/badge/version-1.0.0-009999)
![License](https://img.shields.io/github/license/ParadauxIO/FriendlyBot)

<br />
<p align="center">
<a href="https://github.com/ParadauxIO/FriendlyBot">
<img src="images/FriendlyBot.png" alt="Logo" width="80" height="80">
</a>
<a href="https://github.com/ParadauxIO/FriendlyBot">
<img src=".github/images/FriendlyBot.png" alt="Logo" width="80" height="80">
</a>

<h3 align="center">FriendlyBot</h3>
<p align="center">
<p align="center">
The general-purpose discord bot made for the <a href="https://csfriendlycorner.com">Computer Science Friendly Corner</a>.
<br />
<a href="https://paradaux.myjetbrains.com/youtrack/projects/821cb79e-73d0-4a28-b06d-ce495ffb1b13">YouTrack</a>
Expand All @@ -20,7 +21,6 @@
<a href="https://github.com/ParadauxIO/FriendlyBot/issues">Issues</a>
·
<a href="https://github.com/ParadauxIO/FriendlyBot/actions">Actions</a>
</p>
</p>

There are plans to generify the codebase to allow for a public discord bot, as well as having a web-based user interface
Expand All @@ -34,7 +34,7 @@ production server.

FriendlyBot makes use of a MongoDB database which is integral to the functionality of the bot, the connection url must
be specified in the configuration file. As well as that, a stable internet connection is required at all times; to talk to
discord and the various web APIs the bot makes use of.
discord, and the various web APIs the bot makes use of.

The following instructions are to be executed on the command line (terminal) requiring write permissions.
This requires both Maven and Git to be added to your terminal's path, other than that these instructions are fairly platform agnostic.
Expand Down Expand Up @@ -67,4 +67,5 @@ Distributed under the MIT License. See [LICENSE.md](https://github.com/ParadauxI

## Contributors

1. [Rían Errity](mailto:[email protected]) — Project Lead — https://paradaux.io
1. [Rían Errity](mailto:[email protected]) — Project Lead — https://paradaux.io
2. This could be you o.0
76 changes: 76 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
plugins {
id 'java'
id 'io.ebean' version '12.10.0'
id 'com.github.johnrengelman.shadow' version '7.0.0'
}

group 'io.paradaux'
version '2.0.0'

repositories {
gradlePluginPortal()
mavenCentral()
maven {
url = "https://m2.dv8tion.net/releases"
}

maven {
url = "https://jitpack.io"
}

maven {
url = "https://repo.paradaux.io/releases"
}

maven {
url = "https://m2.chew.pro/releases"
}
}

dependencies {

implementation 'org.postgresql:postgresql:42.2.23'
implementation 'net.dv8tion:JDA:4.3.0_300'
implementation 'pw.chew:jda-chewtils:1.20'
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'org.slf4j:slf4j-log4j12:1.7.32'
implementation 'com.google.code.gson:gson:2.8.8'
implementation 'org.mongodb:mongo-java-driver:3.12.10'
implementation 'io.paradaux.http:HttpApi:1.1.2'
implementation 'io.ebean:ebean:12.11.3'
implementation 'com.h2database:h2:1.4.200'
implementation 'org.spongepowered:configurate-hocon:4.1.2'

annotationProcessor 'io.ebean:querybean-generator:12.11.3'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
testImplementation 'io.ebean:ebean-test:12.11.3'

testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
}

test {
useJUnitPlatform()
}

compileJava {
options.release = 11
options.encoding('UTF-8')
}

jar {
manifest {
attributes(
'Main-Class': 'io.paradaux.friendlybot.FBApplication'
)
}

from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}

// Allow use of Emojis inline
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading