Skip to content

Commit

Permalink
optimize bruh
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Nov 25, 2023
1 parent 3b7c826 commit a941e07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bots-gulag",
"version": "3.2.0",
"version": "3.2.69",
"description": "Bots",
"repository": "https://github.com/CarelessDev/bots-gulag",
"type": "module",
Expand Down
19 changes: 10 additions & 9 deletions src/slave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,22 @@ export const slaves: Parameters<typeof buildSlave>[] = [
)
return;

const reference = await msg.fetchReference();
msg.delete().catch(() => {
console.log(
chalk.red(`Failed to delete skill issue request message`),
);
});

if (!reference) return;
const [reference, sticker] = await Promise.all([
msg.fetchReference(),
getSticker(msg.guild, environment.SKILLISSUE),
]);

const sticker = await getSticker(msg.guild, environment.SKILLISSUE);
if (!reference) return;

await reference.reply({
stickers: [sticker],
});

await msg.delete().catch(() => {
console.log(
chalk.red(`Failed to delete skill issue request message`),
);
});
}
},
],
Expand Down

0 comments on commit a941e07

Please sign in to comment.