aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/admin/roleAll.ts1
-rw-r--r--src/commands/info/color.ts2
-rw-r--r--src/listeners/guild/guildMemberAdd.ts30
3 files changed, 15 insertions, 18 deletions
diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts
index 5e891ee..82d15f5 100644
--- a/src/commands/admin/roleAll.ts
+++ b/src/commands/admin/roleAll.ts
@@ -56,7 +56,6 @@ export default class RoleAllCommand extends BushCommand {
});
await message.util.reply(`${util.emojis.loading} adding roles to ${members.size} members`);
- console.timeEnd('roleAll3');
const promises = members.map((member: GuildMember) => {
return member.roles.add(args.role, `RoleAll Command - triggered by ${message.author.tag} (${message.author.id})`);
diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts
index 5268516..d641fd7 100644
--- a/src/commands/info/color.ts
+++ b/src/commands/info/color.ts
@@ -4,10 +4,8 @@ import { Message, MessageEmbed, Role } from 'discord.js';
import tinycolor from 'tinycolor2'; // this is the only way I got it to work consistently
const isValidTinyColor = (_message: Message, phase: string) => {
- console.dir(phase);
// if the phase is a number it converts it to hex incase it could be representing a color in decimal
const newPhase = isNaN(phase as any) ? phase : `#${Number(phase).toString(16)}`;
- console.dir(newPhase);
return tinycolor(newPhase).isValid() ? newPhase : null;
};
diff --git a/src/listeners/guild/guildMemberAdd.ts b/src/listeners/guild/guildMemberAdd.ts
index 631eb5d..db014a8 100644
--- a/src/listeners/guild/guildMemberAdd.ts
+++ b/src/listeners/guild/guildMemberAdd.ts
@@ -84,22 +84,22 @@ export default class GuildMemberAddListener extends BushListener {
}
}
}
+ } else {
+ const joinRoles = await member.guild.getSetting('joinRoles');
+ if (!joinRoles || !joinRoles.length) return;
+ await member.roles
+ .add(joinRoles, 'Join roles.')
+ .then(() =>
+ client.console.info('guildMemberAdd', `Assigned join roles to <<${member.user.tag}>> in <<${member.guild.name}>>.`)
+ )
+ .catch(
+ () =>
+ void client.console.warn(
+ 'guildMemberAdd',
+ `Failed to assign join roles to <<${member.user.tag}>>, in <<${member.guild.name}>>.`
+ )
+ );
}
- } else {
- const joinRoles = await member.guild.getSetting('joinRoles');
- if (!joinRoles || !joinRoles.length) return;
- await member.roles
- .add(joinRoles, 'Join roles.')
- .then(() =>
- client.console.info('guildMemberAdd', `Assigned join roles to <<${member.user.tag}>> in <<${member.guild.name}>>.`)
- )
- .catch(
- () =>
- void client.console.warn(
- 'guildMemberAdd',
- `Failed to assign join roles to <<${member.user.tag}>>, in <<${member.guild.name}>>.`
- )
- );
}
}
}