Skip to content

Commit

Permalink
Mappings: Quick hotfix for unmapped names
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Aug 2, 2021
1 parent 1621f2b commit dd428e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fun classesToPages(

val (clientName, serverName) = clazz.obfName.stringPairs()

if (clientName != null) {
if (clientName != null && clientName.isNotEmpty()) {
if (serverName == null) {
text += "**Name:** `$clientName` -> "
} else {
Expand All @@ -41,7 +41,7 @@ fun classesToPages(
} ?: "")
}

if (serverName != null) {
if (serverName != null && serverName.isNotEmpty()) {
if (clientName != null) {
text += "\n"
}
Expand All @@ -64,7 +64,7 @@ fun classesToPages(

val (clientName, serverName) = clazz.obfName.stringPairs()

if (clientName != null) {
if (clientName != null && clientName.isNotEmpty()) {
if (serverName == null) {
text += "**Name:** `$clientName` -> "
} else {
Expand All @@ -77,7 +77,7 @@ fun classesToPages(
} ?: "")
}

if (serverName != null) {
if (serverName != null && serverName.isNotEmpty()) {
if (clientName != null) {
text += "\n"
}
Expand Down Expand Up @@ -130,8 +130,8 @@ fun fieldsToPages(

val (clientName, serverName) = field.obfName.stringPairs()

if (clientName != null) {
if (serverName == null) {
if (!clientName.isNullOrEmpty()) {
if (!serverName.isNullOrEmpty()) {
text += "**Name:** `$clientName` -> "
} else {
text += "**Client:** `$clientName` -> "
Expand All @@ -143,8 +143,8 @@ fun fieldsToPages(
} ?: "")
}

if (serverName != null) {
if (clientName != null) {
if (!serverName.isNullOrEmpty()) {
if (!clientName.isNullOrEmpty()) {
text += "\n"
}

Expand Down Expand Up @@ -174,8 +174,8 @@ fun fieldsToPages(

val (clientName, serverName) = field.obfName.stringPairs()

if (clientName != null) {
if (serverName == null) {
if (!clientName.isNullOrEmpty()) {
if (!serverName.isNullOrEmpty()) {
text += "**Name:** `$clientName` -> "
} else {
text += "**Client:** `$clientName` -> "
Expand All @@ -187,8 +187,8 @@ fun fieldsToPages(
} ?: "")
}

if (serverName != null) {
if (clientName != null) {
if (!serverName.isNullOrEmpty()) {
if (!clientName.isNullOrEmpty()) {
text += "\n"
}

Expand Down Expand Up @@ -255,8 +255,8 @@ fun methodsToPages(

val (clientName, serverName) = method.obfName.stringPairs()

if (clientName != null) {
if (serverName == null) {
if (!clientName.isNullOrEmpty()) {
if (!serverName.isNullOrEmpty()) {
text += "**Name:** `$clientName` -> "
} else {
text += "**Client:** `$clientName` -> "
Expand All @@ -268,8 +268,8 @@ fun methodsToPages(
} ?: "")
}

if (serverName != null) {
if (clientName != null) {
if (!serverName.isNullOrEmpty()) {
if (!clientName.isNullOrEmpty()) {
text += "\n"
}

Expand All @@ -294,7 +294,7 @@ fun methodsToPages(

val (clientName, serverName) = method.obfName.stringPairs()

if (clientName != null) {
if (clientName != null && clientName.isNotEmpty()) {
if (serverName == null) {
text += "**Name:** `$clientName` -> "
} else {
Expand All @@ -307,7 +307,7 @@ fun methodsToPages(
} ?: "")
}

if (serverName != null) {
if (serverName != null && serverName.isNotEmpty()) {
if (clientName != null) {
text += "\n"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@ import mu.KotlinLogging
*/
public fun inChannel(builder: suspend () -> ChannelBehavior): Check<*> = {
val logger = KotlinLogging.logger("com.kotlindiscord.kord.extensions.checks.inChannel")

// TODO: When we can get the thread parent, checks will need looking at again
// val thread = threadFor(event)
//
// val eventChannel = when(thread) {
// is NewsChannelThread -> thread
// is TextChannelThread -> thread
//
// else -> channelFor(event)
// }

val eventChannel = channelFor(event)

if (eventChannel == null) {
Expand Down

0 comments on commit dd428e2

Please sign in to comment.