Skip to content

Commit dfd4915

Browse files
committed
fix: update token regex to support hyphens
1 parent 8566f94 commit dfd4915

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h1 class="text-3xl font-bold text-yellow-700 mb-4">Connect a New Bot</h1>
5151
}
5252

5353
// Regex check the bot token first
54-
if (!/^\d{5,}:\w{10,}/.test(botToken)){
54+
if (!/^\d{5,}:[\w-]{10,}/.test(botToken)){
5555
showError('Bot token is invalid!');
5656
return;
5757
}

0 commit comments

Comments
 (0)