Skip to content

Commit

Permalink
Allow directly specifying uuids
Browse files Browse the repository at this point in the history
  • Loading branch information
nea89o committed Mar 15, 2024
1 parent 4531b7f commit 220c9f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/moe/nea/gaybot/Gaybot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ suspend fun main() {
}
val name = interaction.command.strings["mcname"]!!
val response = interaction.deferPublicResponse()
if (!name.matches("^[_a-z0-9A-Z]{3,16}$".toRegex())) {
if (!name.matches("^[_a-z0-9A-Z]{3,16}$".toRegex())
&& !name.matches("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$".toRegex())) {
response.respond {
content = "$name does not seem to be a valid minecraft user name"
allowedMentions()
Expand Down

0 comments on commit 220c9f2

Please sign in to comment.