From 5c0b7e369f854802e3f16f2c39bfb85780b290f3 Mon Sep 17 00:00:00 2001 From: Aiko Vandeputte Date: Sat, 23 Mar 2024 19:07:05 +0100 Subject: [PATCH] Simplify issue embed author assignment --- .../com/rokucraft/rokubot/command/commands/IssueCommand.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/rokucraft/rokubot/command/commands/IssueCommand.kt b/src/main/kotlin/com/rokucraft/rokubot/command/commands/IssueCommand.kt index a5b6eba..bd32b23 100644 --- a/src/main/kotlin/com/rokucraft/rokubot/command/commands/IssueCommand.kt +++ b/src/main/kotlin/com/rokucraft/rokubot/command/commands/IssueCommand.kt @@ -61,7 +61,7 @@ class IssueCommand( private fun createIssueEmbed(issue: GHIssue): MessageEmbed { val open = issue.state == GHIssueState.OPEN val author = issue.user - val authorName = if (author.name != null) author.name else author.login + val authorName = author.name ?: author.login var issueBody = issue.body .replace(Regex("(?s)"), "") // Removes HTML comments .trim()