Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
[bump] v1.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT2 committed Jan 25, 2021
1 parent 9207e1e commit a0ec42a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If that still does not help, Hit `Add Configuration` in the upper right of your
#### Running prebuilt binaries

```bash
java -jar bot-kt-v1.8.3.jar
java -jar bot-kt-v1.8.4.jar
```

#### Disabling update checking
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bot_kt_version=v1.8.3
bot_kt_version=v1.8.4

bot_kotlin_version=1.4.21
bot_kotlinx_coroutines_version=1.4.1
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/org/kamiblue/botkt/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import kotlin.system.exitProcess

object Main {

const val currentVersion = "v1.8.3"
const val currentVersion = "v1.8.4"

val startUpTime: Instant = Instant.now()
@Suppress("EXPERIMENTAL_API_USAGE")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ object ResponseManager : Manager {
private fun getCachedResponse(config: ResponseConfig): Pair<List<Response>, List<Response>> {
return if (config != prevConfig) {
synchronized(this) {
(config.responses.sortedByDescending { it.deleteMessage }
to config.responses.filter { it.deleteMessage })
(config.responses.sortedByDescending { it.deleteMessage } to config.responses.filter { it.deleteMessage })
.also { cachedResponses = it }
}
} else {
Expand All @@ -71,9 +70,9 @@ object ResponseManager : Manager {
val channel = message.channel

for (response in responses) {
if (response.ignoreRoles?.isNotEmpty() == true
&& (config.roleIgnorePrefix.isNullOrEmpty() || !messageContent.startsWith(config.roleIgnorePrefix))
&& member.roles.any { response.ignoreRoles.contains(it.id) }
if (response.ignoreRoles?.isNotEmpty() == true &&
(config.roleIgnorePrefix.isNullOrEmpty() || !messageContent.startsWith(config.roleIgnorePrefix)) &&
member.roles.any { response.ignoreRoles.contains(it.id) }
) {
continue // If the message doesn't start with the ignore prefix and they have an ignored role, skip to the next regex
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/org/kamiblue/botkt/utils/StringUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object StringUtils {

fun String.capitalizeWords(): String = split(" ").joinToString(" ") { it.capitalize() }

fun String.urlEncode(): String = URLEncoder.encode(this, Charsets.UTF_8)
fun String.urlEncode(): String = URLEncoder.encode(this, "UTF-8")

fun String.toUserID() = replace("[<@!>]".toRegex(), "").toLongOrNull()

Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v1.8.3"
"version": "v1.8.4"
}

0 comments on commit a0ec42a

Please sign in to comment.