diff --git a/src/structure/components/observers/UtilityHook.js b/src/structure/components/observers/UtilityHook.js index 113a32f..1ea74e9 100644 --- a/src/structure/components/observers/UtilityHook.js +++ b/src/structure/components/observers/UtilityHook.js @@ -126,7 +126,7 @@ class UtilityHook extends Observer { // Sometimes the member isn't available on the API for some reason, // seeing if waiting a bit helps, so we don't try to patch a member that's still being processed on discord's API await Util.wait(5 * 1000); - await member.roles.add(roles, 'Adding autoroles').catch(this.logger.error.bind(this.logger)); + await member.roles.add(roles, 'Adding autoroles').catch(() => null); } @@ -137,9 +137,11 @@ class UtilityHook extends Observer { const setting = settings.welcomer; if (!setting.enabled || !setting.message) return; - const channel = await user.createDM(); + const channel = await user.createDM().catch(() => null); + if (!channel) return; + const message = this._replaceTags(setting.message, member); - await channel.send(message).catch(); + await channel.send(message).catch(() => null); }