Skip to content

Commit 64701ae

Browse files
committed
fix compile errors
1 parent 124c9b4 commit 64701ae

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

src/modules/suggest/suggest.command.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const SuggestCommand: Command<ApplicationCommandType.ChatInput> = {
7070

7171
const embed = await createSuggestionEmbed(
7272
suggestionId,
73+
interaction.client,
7374
member,
7475
suggestionText,
7576
);

src/modules/suggest/suggest.listener.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ async function respondToSuggestionInteraction(
5656
});
5757
return;
5858
}
59-
const member = await interaction.guild.members.fetch(
60-
suggestion.memberId.toString(),
61-
);
6259

6360
// Find the thread associated with the original message
6461
let threadUrl: string | undefined;
@@ -70,8 +67,8 @@ async function respondToSuggestionInteraction(
7067
}
7168

7269
const embed = await createSuggestionEmbedFromEntity(
70+
interaction.client,
7371
suggestion,
74-
member,
7572
moderatorReason,
7673
threadUrl,
7774
);
@@ -138,12 +135,7 @@ export const SuggestionButtonListener: EventListener = {
138135

139136
await suggestion.reload();
140137
await interaction.message.edit({
141-
embeds: [
142-
await createSuggestionEmbedFromEntity(
143-
suggestion,
144-
interaction.member as GuildMember,
145-
),
146-
],
138+
embeds: [await createSuggestionEmbedFromEntity(client, suggestion)],
147139
});
148140

149141
let content = `You ${previousVoteValue && previousVoteValue === votingValue ? "already " : ""}voted ${votingValue === 1 ? "**Yes**" : "**No**"} on this suggestion`;

0 commit comments

Comments
 (0)