Skip to content

Commit

Permalink
Merge branch 'develop' into translations
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/kotlin/org/hyacinthbots/lilybot/extensions/util/PublicUtilities.kt
#	src/main/kotlin/org/hyacinthbots/lilybot/utils/_Constants.kt
  • Loading branch information
NoComment1105 committed Sep 20, 2023
2 parents 615963f + 25fad94 commit aed23cf
Show file tree
Hide file tree
Showing 59 changed files with 1,007 additions and 1,207 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
enable-beta-ecosystems: true

updates:
- package-ecosystem: "gradle"
target-branch: "develop"
directory: "/"

schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
target-branch: "develop"
directory: "/"

schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
Expand All @@ -36,7 +36,7 @@ jobs:
path: build/libs/*[0-9].jar

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3

with:
registry: ghcr.io
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
Expand Down
21 changes: 12 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
application

Expand All @@ -16,7 +15,7 @@ plugins {
}

group = "org.hyacinthbots.lilybot"
version = "4.8.0"
version = "4.9.0"

repositories {
mavenCentral()
Expand Down Expand Up @@ -96,9 +95,7 @@ tasks {

jar {
manifest {
attributes(
"Main-Class" to "org.hyacinthbots.lilybot.LilyBotKt"
)
attributes("Main-Class" to "org.hyacinthbots.lilybot.LilyBotKt")
}
}

Expand All @@ -110,12 +107,18 @@ tasks {

detekt {
buildUponDefaultConfig = true
config = files("$rootDir/detekt.yml")
config.setFrom("$rootDir/detekt.yml")

autoCorrect = true
}

blossom {
replaceToken("@build_id@", grgit.head().abbreviatedId)
replaceToken("@version@", project.version.toString())
sourceSets {
main {
blossom {
kotlinSources {
property("build_id", grgit.head().abbreviatedId)
property("version", project.version.toString())
}
}
}
}
7 changes: 1 addition & 6 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ naming:
active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
excludeClassPattern: '$^'
ignoreOverridden: true
InvalidPackageDeclaration:
active: true
rootPackage: 'org.HyacinthBots'
Expand Down Expand Up @@ -283,7 +282,7 @@ style:
includeLineWrapping: true
ForbiddenComment:
active: false
values: ['TODO:', 'FIXME:', 'STOPSHIP:']
comments: ['TODO:', 'FIXME:', 'STOPSHIP:']
allowedPatterns: ''
ForbiddenImport:
active: false
Expand All @@ -310,14 +309,10 @@ style:
ignoreNamedArgument: true
ignoreEnums: true
ignoreRanges: false
MandatoryBracesIfStatements:
active: true
MandatoryBracesLoops:
active: true
OptionalUnit:
active: false
OptionalWhenBraces:
active: true
PreferToOverPairSyntax:
active: true
RedundantExplicitType:
Expand Down
2 changes: 1 addition & 1 deletion docs/changelogs/4.x.x/4.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Fix:
* Remove deprecated kord functions (Internal)
* Fix reminder IDs sometimes overlapping causing duplicate entries and errors

You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.6.3...v4.7.0)
You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.7.0...v4.8.0)
15 changes: 15 additions & 0 deletions docs/changelogs/4.x.x/4.8.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# LilyBot 4.8.1

This update fixes ban commands and some errors.
You can find the full changelog below

Change:
* Update Gradle 8.0.2 and kordex dependency (Internal)
* Send bulk deletes to mod log and message log as they apply to both

Fix:
* Ban command taking forever while getting messages
* Fix some errors that would appear in AutoThreading when the thread didn't exist yet.
* Guild announcements getting cancelled on exception, meaning messages weren't delivered to some guilds

You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.8.0...v4.8.1)
12 changes: 12 additions & 0 deletions docs/changelogs/4.x.x/4.8.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# LilyBot 4.8.2

This update fixes a bug and deprecate log uploading.
You can find the full changelog below

Change:
* Log uploading is now deprecated as it has been implemented into [Allium](https://github.com/HyacinthBots/Allium). It will be removed in 4.9.0

Fix:
* Message bulk delete throwing NPEs when it cannot collect the messages

You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.8.0...v4.8.1)
5 changes: 5 additions & 0 deletions docs/changelogs/4.x.x/4.8.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# LilyBot 4.8.3

This update fixes a security vulnerability in the welcome channel dependency.

You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.8.2...v4.8.3)
10 changes: 10 additions & 0 deletions docs/changelogs/4.x.x/4.8.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# LilyBot 4.8.4

This update fixes a bug and deprecate log uploading.
You can find the full changelog below

Change:
* Update to Kord 0.8.0, meaning we got forums!!!!
* Update other dependencies

You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.8.3...v4.8.4)
19 changes: 19 additions & 0 deletions docs/changelogs/4.x.x/4.8.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# LilyBot 4.8.5

This update fixes a bug and deprecate log uploading.
You can find the full changelog below

New:
* Tags can now be 4096 characters long, quite why you'd want a tag that's 4kB long I don't know, but you can do that now
* Lily will send a message in a gallery channel when permissions are broken for her

Change:
* Role menu buttons are now GuildButtons
* Upgradle to 8.1.1
* The role mention check now takes into account the `Mention @everyone, @here and All Roles` permission

Fix:
* Old tags are no longer deleted before the new tag is validated fixing wierd issues in editing
* Hopefully stop reminder randomly disappearing and subsequently multi-pinging as we're properly checking reminders before deleting them now

You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.8.4...v4.8.5)
19 changes: 19 additions & 0 deletions docs/changelogs/4.x.x/4.9.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# LilyBot 4.9.0

This release removes th deprecated log uploading, expands the capabilities of the clear command and fixes many bugs
You can find the full changelog below

New:
* Allow custom messages to be sent with bans, intended for adding Appeals Servers. This is part of the moderation config

Change:
* The clear command can now clear different ranges of messages based on certain parameters. #348
* Lily now uses the official Kotlin MongoDB driver, rather than KMongo. #351
* Upgradle to 8.3 and update other dependencies

Fix:
* Remove usage of deprecated username tags, making use of the new username system
* Fix bulk delete now working properly
* The permission checks on Auto-threading roles

You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.8.5...v4.9.0)
64 changes: 37 additions & 27 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Required Member Permissions: Manage Server
* `quick-timeout-length` - The length of timeouts to use for quick timeouts - Coalescing Optional Duration
* `warn-auto-punishments` - Whether to automatically punish users for reach a certain threshold on warns - Optional Boolean
* `log-publicly` - Whether to log moderation publicly or not. - Optional Boolean
* `ban-dm-message` - A custom message to send to users when they are banned. - Optional String

---
#### Command name: `config logging`
Expand All @@ -67,7 +68,6 @@ Required Member Permissions: Manage Server
Required Member Permissions: Manage Server

* **Arguments**:
* `disable-log-uploading` - Enable or disable log uploading for this guild - Boolean
* `utility-log` - The channel to log various utility actions too. - Optional Channel

---
Expand Down Expand Up @@ -199,27 +199,6 @@ Required Member Permissions: Moderate Members
**Description**: Unlock the server so everyone can send messages again
Required Member Permissions: Moderate Members

* **Arguments**:
None
---
#### Command name: `log-uploading blacklist-add`
**Description**: Add a channel to the log uploading blacklist
Required Member Permissions: Moderate Members

* **Arguments**:
None
---
#### Command name: `log-uploading blacklist-remove`
**Description**: Remove a channel from the log uploading blacklist
Required Member Permissions: Moderate Members

* **Arguments**:
None
---
#### Command name: `log-uploading blacklist-list`
**Description**: List all channels that block log uploading
Required Member Permissions: Moderate Members

* **Arguments**:
None
---
Expand Down Expand Up @@ -313,12 +292,43 @@ Description: Kicks a user.
* `image` - An image you'd like to provide as extra context for the action - Optional Attachment

---
### Command name: `clear`
Description: Clears messages from a channel.
**Required Member Permissions**: Manage Messages
#### Command name: `clear count`
**Description**: Clear a specific count of messages
Required Member Permissions: Manage Messages

* Arguments:
* **Arguments**:
* `messages` - Number of messages to delete - Int
* `author` - The author of the messages to clear - Optional User

---
#### Command name: `clear before`
**Description**: Clear messages before a given message ID
Required Member Permissions: Manage Messages

* **Arguments**:
* `before` - The ID of the message to clear before - Snowflake
* `message-count` - The number of messages to clear - Optional Int/Long
* `author` - The author of the messages to clear - Optional User

---
#### Command name: `clear after`
**Description**: Clear messages before a given message ID
Required Member Permissions: Manage Messages

* **Arguments**:
* `after` - The ID of the message to clear after - Snowflake
* `message-count` - The number of messages to clear - Optional Int/Long
* `author` - The author of the messages to clear - Optional User

---
#### Command name: `clear between`
**Description**: Clear messages between 2 message IDs
Required Member Permissions: Manage Messages

* **Arguments**:
* `after` - The ID of the message to clear after - Snowflake
* `before` - The ID of the message to clear before - Snowflake
* `author` - The author of the messages to clear - Optional User

---
### Command name: `timeout`
Expand Down Expand Up @@ -667,7 +677,7 @@ Description: Check whether a given domain is a known phishing domain.
**Description**: Set a custom API URL, "reset" to reset

* **Arguments**:
* `api-url` - Set an alternative API url, or "reset" to use the default - Optional String
* `api-url` - Set an alternative API URL, or "reset" to use the default - Optional String

---
#### Command name: `pluralkit bot`
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# suppress inspection "UnusedProperty" for whole file
# Gradle props
org.gradle.jvmargs=-Xmx1536m -XX:MaxMetaspaceSize=1536m
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=2048m
org.gradle.parallel=true
kotlin.incremental=true
kotlin.code.style=official
26 changes: 13 additions & 13 deletions libs.versions.toml → gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[versions]
# Plugins
kotlin = "1.8.10"
shadow = "8.1.0"
detekt = "1.22.0"
kotlin = "1.9.10"
shadow = "8.1.1"
detekt = "1.23.1"
git-hooks = "0.0.2"
grgit = "5.0.0"
blossom = "1.3.1"
grgit = "5.2.0"
blossom = "2.1.0"

# Libraries
kord-extensions = "1.5.6-20230224.151334-5"
logging = "3.0.5"
logback = "1.4.5"
github-api = "1.314"
kmongo = "4.8.0"
cozy-welcome = "1.0-SNAPSHOT"
dma = "0.2.0-SNAPSHOT"
kord-extensions = "1.5.9-20230809.104126-1"
logging = "5.1.0"
logback = "1.4.11"
github-api = "1.316"
kmongo = "4.10.0"
cozy-welcome = "1.0.1-SNAPSHOT"
dma = "v0.2.1"
docgenerator = "0.1.2-SNAPSHOT"

[libraries]
Expand All @@ -24,7 +24,7 @@ kord-extensions-pluralkit = { module = "com.kotlindiscord.kord.extensions:extra-
kord-extensions-unsafe = { module = "com.kotlindiscord.kord.extensions:unsafe", version.ref = "kord-extensions"}
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib" }
logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
logging = { module = "io.github.microutils:kotlin-logging", version.ref = "logging" }
logging = { module = "io.github.oshai:kotlin-logging", version.ref = "logging" }
github-api = { module = "org.kohsuke:github-api", version.ref = "github-api" }
kmongo = { module = "org.litote.kmongo:kmongo-coroutine-serialization", version.ref = "kmongo" }
detekt = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt"}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit aed23cf

Please sign in to comment.