Skip to content

Commit

Permalink
Allow special characters in usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalissaac committed Mar 18, 2021
1 parent f1ba483 commit b4a0e09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const edit = async (message, GLOBALS) => {

switch (editedProperty) {
case 'username':
if (editedValue.match(/\w{3,16}#\w{3,5}/)) userInformation.valorantUsername = editedValue
if (editedValue.match(/\S{3,16}#\S{3,5}/)) userInformation.valorantUsername = editedValue
else return message.reply('Please give a valid username!').then(msg => msg.delete({ timeout: 5000 }))
break
case 'rank':
Expand Down
2 changes: 1 addition & 1 deletion src/services/userRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const handleUserRegistration = (userRecord, userMessage, GLOBALS) => {

switch (userRecord.step) {
case 0:
if (userMessage.content.match(/\w{3,16}#\w{3,5}/)) userRecord.registrationInformation.valorantUsername = userMessage.content
if (userMessage.content.match(/\S{3,16}#\S{3,5}/)) userRecord.registrationInformation.valorantUsername = userMessage.content
else return userMessage.reply('Please give a valid username!').then(msg => msg.delete({ timeout: 5000 }))
break
case 1:
Expand Down

0 comments on commit b4a0e09

Please sign in to comment.