Skip to content

Commit

Permalink
react with the emoji used
Browse files Browse the repository at this point in the history
  • Loading branch information
Techbot121 authored and Meta Construct committed Apr 2, 2024
1 parent bd32e18 commit d1fc53f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/services/Starboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ export class Starboard extends Service {
let emojiFilter: string[] | undefined;
let targetChannel: Discord.Channel | undefined;
let title: string | undefined;
let shouldReact = false;

switch (parent) {
case discordConfig.channels.artsAndCrafts:
shouldReact = true;
needed = 6;
title =
reaction.message.channel.isThread() &&
Expand All @@ -61,6 +63,7 @@ export class Starboard extends Service {
default:
switch (channel.id) {
case discordConfig.channels.artChat:
shouldReact = true;
needed = 6;
targetChannel = client.channels.cache.get(discordConfig.channels.hArt);
break;
Expand Down Expand Up @@ -138,7 +141,7 @@ export class Starboard extends Service {
const webhook = webhooks.find(h => h.token);

if (webhook) {
await webhook.send({
const starred = await webhook.send({
content: text,
avatarURL: msg.author.avatarURL() ?? "",
username: `${msg.author.username}`,
Expand All @@ -160,6 +163,7 @@ export class Starboard extends Service {
],
});
await this.starMsg(msg.id);
if (shouldReact) await starred.react(reaction.emoji);
}
this.isBusy = false;
}
Expand Down

0 comments on commit d1fc53f

Please sign in to comment.