Skip to content

Commit

Permalink
Update bot.js
Browse files Browse the repository at this point in the history
  • Loading branch information
BoQsc authored Jul 4, 2023
1 parent 8b94c6f commit 3d564a7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,23 @@ client.on("ready", async () => {
},
});



// Bot set self nickname on all the servers.
//Split Bot name into two words before displaying
const splitWord = client.user.username.replace(/([a-z])([A-Z])/g, '$1 $2');
client.servers.forEach(async (values, keys, objects) => {
await values.member.edit({

nickname: `${splitWord}`

});
});

});



/* ----------------------- 6. Reply to Guild Messages ------------------------- */
// Wait for messages and respond with a message in the guilds where this Bot Exists.
client.on("messageCreate", async (message) => {
Expand Down

0 comments on commit 3d564a7

Please sign in to comment.