Skip to content

Commit

Permalink
fix(Hoshi): Remove console.logs & add react when a message is starboa…
Browse files Browse the repository at this point in the history
…rded
  • Loading branch information
jurienhamaker committed Feb 20, 2024
1 parent 9c763b5 commit 6c334a9
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ export class StarboardService {
return;
}

console.log('1');
const users = await reaction.users.fetch();
console.log(users);
const filteredUsers = users.filter(
(u) => (self || u.id !== reaction.message.author.id) && !u.bot,
);
Expand All @@ -63,13 +61,11 @@ export class StarboardService {
if (filteredUsers.size === 0 && log) {
return this._deleteStarboard(log);
}
console.log('2');

if (filteredUsers.size < treshold) {
return;
}

console.log('3');
const embed = this._createEmbed(reaction.message as Message);

if (!embed) {
Expand Down Expand Up @@ -222,6 +218,7 @@ export class StarboardService {
});

await starboardMessage.react(emoji);
await message.react('🌟');
}

private async _updateStarboard(
Expand Down

0 comments on commit 6c334a9

Please sign in to comment.