Skip to content

Commit

Permalink
fix: update token regex to support hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisin0 committed Oct 2, 2024
1 parent 8566f94 commit dfd4915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h1 class="text-3xl font-bold text-yellow-700 mb-4">Connect a New Bot</h1>
}

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

0 comments on commit dfd4915

Please sign in to comment.