-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the default locale back to English, but use the portuguese lab…
…el when searching for command mentions
- Loading branch information
1 parent
0164a11
commit bb1fcad
Showing
3 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...c/main/kotlin/net/perfectdreams/loritta/morenitta/interactions/commands/DiscordCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package net.perfectdreams.loritta.morenitta.interactions.commands | ||
|
||
import kotlinx.serialization.Serializable | ||
import net.dv8tion.jda.api.interactions.DiscordLocale | ||
import net.dv8tion.jda.api.interactions.commands.Command | ||
|
||
@Serializable | ||
data class DiscordCommand( | ||
val id: Long, | ||
val name: String | ||
val name: String, | ||
val nameLocalizations: Map<DiscordLocale, String> | ||
) { | ||
companion object { | ||
fun from(command: Command) = DiscordCommand( | ||
command.idLong, | ||
command.name | ||
command.name, | ||
command.nameLocalizations.toMap() | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters