Skip to content

Commit

Permalink
Merge pull request #54 from PeterStark000/main
Browse files Browse the repository at this point in the history
Add support for commas in the user ID list in `/loritools` LoriBan-related commands
  • Loading branch information
MrPowerGamerBR authored Sep 30, 2024
2 parents 8ff634c + 224c154 commit 97cd6ab
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ class LoriToolsCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrapp
context.deferChannelMessage(true)

val userIds = args[options.userIds]
.replace(",", "")
.split(" ")
.mapNotNull { it.toLongOrNull() }
.toSet()
Expand Down Expand Up @@ -273,6 +274,7 @@ class LoriToolsCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrapp
context.deferChannelMessage(true)

val userIds = args[options.userIds]
.replace(",", "")
.split(" ")
.mapNotNull { it.toLongOrNull() }
.toSet()
Expand Down Expand Up @@ -319,6 +321,7 @@ class LoriToolsCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrapp
context.deferChannelMessage(true)

val userIds = args[options.userIds]
.replace(",", "")
.split(" ")
.mapNotNull { it.toLongOrNull() }
.toSet()
Expand Down Expand Up @@ -425,6 +428,7 @@ class LoriToolsCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrapp

override suspend fun executeHelper(context: ApplicationCommandContext, args: SlashCommandArguments) {
val userIds = args[options.userIds]
.replace(",", "")
.split(" ")
.mapNotNull { it.toLongOrNull() }
.toSet()
Expand Down

0 comments on commit 97cd6ab

Please sign in to comment.