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 5, 2023
1 parent 807999f commit 6907965
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ 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');
//const splitWord = client.user.username.replace(/([a-z])([A-Z])/g, '$1 $2'); // nickname: `${splitWord}`

client.servers.forEach(async (values, keys, objects) => {
await values.member.edit({

nickname: `${splitWord}`
nickname: `${values.name}`

});
});
Expand All @@ -85,6 +86,7 @@ client.on("messageCreate", async (message) => {
}

// Support for @BotUsername in the chat
// TODO: Add permissions check
if (message.authorId !== client.user.id){
if (message.content.includes(`<@${client.user.id}> ` + "write")) {
const includedText = message.content.split(`<@${client.user.id}> ` + "write")[1];
Expand Down

0 comments on commit 6907965

Please sign in to comment.