Files
NitoriBot/src/util/usernameGen.js
T

11 lines
335 B
JavaScript
Raw Normal View History

2024-07-07 15:44:16 -04:00
function usernameGen () {
const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
let username = '';
for (let i = 0; i < 10; i++ ) {
const randomIndex = Math.floor(Math.random() * characters.length);
username += characters[randomIndex];
}
return username;
}
2024-07-07 15:44:16 -04:00
module.exports = usernameGen;