Skip to content

Commit

Permalink
fix: Remove unused imports and simplify user notif
Browse files Browse the repository at this point in the history
in BlacklistManager
  • Loading branch information
dev-737 committed Nov 12, 2023
1 parent 91165bf commit 3cfbbf5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/managers/BlacklistManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import SuperClient from '../SuperClient.js';
import { blacklistedServers, blacklistedUsers } from '@prisma/client';
import { EmbedBuilder, Snowflake } from 'discord.js';
import { emojis, colors } from '../utils/Constants.js';
import { captureException } from '@sentry/node';
import Logger from '../utils/Logger.js';

export default class BlacklistManager {
private scheduler: Scheduler;

Expand Down Expand Up @@ -124,13 +121,7 @@ export default class BlacklistManager {
if (type === 'user') {
embed.setDescription(`You have been blacklisted from talking in hub **${hub?.name}**.`);
const user = await SuperClient.getInstance().users.fetch(userOrServerId);
try {
await user.send({ embeds: [embed] });
}
catch (e) {
Logger.error(e);
captureException(e);
}
await user.send({ embeds: [embed] }).catch(() => null);
}
else {
embed.setDescription(
Expand Down

0 comments on commit 3cfbbf5

Please sign in to comment.