From e05000e6ffdfdd2f742acf76d1a0110e7a9897d7 Mon Sep 17 00:00:00 2001 From: sschr15 Date: Fri, 11 Aug 2023 14:32:17 -0500 Subject: [PATCH] Implement AMA module (#76) * Implement AMA bot from https://github.com/NoComment1105/cozy-ama * Change button appearance to match initial creation * PluralKit support, more configuration possibilities, and extra response info --------- Co-authored-by: NoComment <67918617+NoComment1105@users.noreply.github.com> --- .idea/inspectionProfiles/Project_Default.xml | 2 +- .idea/jarRepositories.xml | 5 + .idea/kotlinScripting.xml | 10 - .idea/modules.xml | 2 + build.gradle.kts | 1 + module-ama/build.gradle.kts | 22 + .../cozy/modules/ama/AmaExtension.kt | 529 ++++++++++++++++++ .../community/cozy/modules/ama/_PkUtils.kt | 189 +++++++ .../community/cozy/modules/ama/_Utils.kt | 441 +++++++++++++++ .../cozy/modules/ama/data/AmaConfig.kt | 31 + .../cozy/modules/ama/data/AmaData.kt | 31 + .../cozy/modules/ama/data/MemoryAmaData.kt | 42 ++ .../modules/ama/enums/QuestionStatusFlag.kt | 17 + settings.gradle.kts | 1 + src/main/kotlin/org/quiltmc/community/App.kt | 4 + .../kotlin/org/quiltmc/community/_Utils.kt | 1 + .../quiltmc/community/database/Migrations.kt | 1 + .../collections/AmaConfigCollection.kt | 48 ++ .../community/database/entities/AmaEntity.kt | 59 ++ .../community/database/entities/UserFlags.kt | 1 + .../community/database/migrations/v23.kt | 22 + 21 files changed, 1448 insertions(+), 11 deletions(-) delete mode 100644 .idea/kotlinScripting.xml create mode 100644 module-ama/build.gradle.kts create mode 100644 module-ama/src/main/kotlin/org/quiltmc/community/cozy/modules/ama/AmaExtension.kt create mode 100644 module-ama/src/main/kotlin/org/quiltmc/community/cozy/modules/ama/_PkUtils.kt create mode 100644 module-ama/src/main/kotlin/org/quiltmc/community/cozy/modules/ama/_Utils.kt create mode 100644 module-ama/src/main/kotlin/org/quiltmc/community/cozy/modules/ama/data/AmaConfig.kt create mode 100644 module-ama/src/main/kotlin/org/quiltmc/community/cozy/modules/ama/data/AmaData.kt create mode 100644 module-ama/src/main/kotlin/org/quiltmc/community/cozy/modules/ama/data/MemoryAmaData.kt create mode 100644 module-ama/src/main/kotlin/org/quiltmc/community/cozy/modules/ama/enums/QuestionStatusFlag.kt create mode 100644 src/main/kotlin/org/quiltmc/community/database/collections/AmaConfigCollection.kt create mode 100644 src/main/kotlin/org/quiltmc/community/database/entities/AmaEntity.kt create mode 100644 src/main/kotlin/org/quiltmc/community/database/migrations/v23.kt diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 4b2e0d40..aaf184ce 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -17,7 +17,7 @@