Skip to content

Commit

Permalink
Merge pull request #298 from HyacinthBots/develop
Browse files Browse the repository at this point in the history
4.4.1
  • Loading branch information
NoComment1105 authored Nov 10, 2022
2 parents 8a6cee9 + 352930d commit 8a8335b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {
}

group = "org.hyacinthbots.lilybot"
version = "4.4.0"
version = "4.4.1"

repositories {
mavenCentral()
Expand Down
12 changes: 12 additions & 0 deletions docs/changelogs/4.4.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# LilyBot 4.4.1

A small update to fix some bugs with logging and warn auto-punishments

You can find the full changelog below.

Fix:
* The timeout embed for warnings over 3 strikes, no longer contains the user object, instead the strike count
* Timeout embeds no longer show when auto-punishments is disabled
* The moderation config logging embed now shows all options, instead of missing quick timeout length and auto punishments

You can find a list of all the commits in this update [here](https://github.com/hyacinthbots/LilyBot/compare/v4.4.0...v4.4.1)
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import org.hyacinthbots.lilybot.database.entities.SupportConfigData
import org.hyacinthbots.lilybot.database.entities.UtilityConfigData
import org.hyacinthbots.lilybot.utils.canPingRole
import org.hyacinthbots.lilybot.utils.getLoggingChannelWithPerms
import org.hyacinthbots.lilybot.utils.interval
import kotlin.time.Duration.Companion.seconds

class Config : Extension() {
Expand Down Expand Up @@ -305,6 +306,18 @@ suspend fun Config.configCommand() = unsafeSlashCommand {
null -> "Disabled"
}
}
field {
name = "Quick timeout length"
value = arguments.quickTimeoutLength.interval() ?: "No quick timeout length set"
}
field {
name = "Warning Auto-punishments"
value = when (arguments.warnAutoPunishments) {
true -> "Enabled"
false -> "Disabled"
null -> "Disabled"
}
}
footer {
text = "Configured by ${user.asUser().tag}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ class ModerationCommands : Extension() {
value = strikes.toString()
}
}
if (strikes != 1) {
if (config.autoPunishOnWarn == true && strikes != 1) {
embed {
warnTimeoutLog(strikes!!, user.asUser(), arguments.userArgument, arguments.reason)
}
Expand Down Expand Up @@ -1248,8 +1248,8 @@ private fun EmbedBuilder.warnTimeoutLog(timeoutNumber: Int, moderator: User, tar
description = "${targetUser.mention} has been timed-out for 12 hours due to 3 warn strikes"

else ->
description = "${targetUser.mention} has been timed-out for 3 days due to $targetUser warn " +
"strike\nIt might be time to consider other " +
description = "${targetUser.mention} has been timed-out for 3 days due to $timeoutNumber warn " +
"strikes\nIt might be time to consider other " +
"action."
}

Expand Down

0 comments on commit 8a8335b

Please sign in to comment.