Skip to content

Commit

Permalink
add titles to messages from threads
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 57e9eb9 commit a1a18b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/services/Starboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ export class Starboard extends Service {
let needed: number;
let emojiFilter: string[] | undefined;
let targetChannel: Discord.Channel | undefined;
let title: string | undefined;

switch (parent) {
case discordConfig.channels.artsAndCrafts:
needed = 6;
title =
reaction.message.thread?.id === reaction.message.id
? reaction.message.thread?.name
: undefined;
targetChannel = client.channels.cache.get(discordConfig.channels.hArt);
break;
default:
Expand Down Expand Up @@ -105,7 +110,8 @@ export class Starboard extends Service {
return;
}

let text = "";
let text = title ? title + "\n" : "";

const reference = msg.reference;
if (reference && reference.messageId) {
const refMsg = await (
Expand Down

0 comments on commit a1a18b0

Please sign in to comment.