Skip to content

Commit 21d5eee

Browse files
committed
fixed server-suggestion-reactions
1 parent 19b69bb commit 21d5eee

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/bot-utilities.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ export class BotUtilities {
384384
}
385385

386386
const expected_types = Array.isArray(expected_type) ? expected_type : [expected_type];
387-
assert(expected_types.includes(channel.type), `Channel ${channel.name} (${id}) not of the expected type`);
387+
assert(
388+
expected_types.includes(channel.type),
389+
`Channel ${channel.name} (${id}) not of the expected type (${channel.type})`,
390+
);
388391
return <T>(<unknown>channel);
389392
}
390393

src/modules/tccpp/components/server-suggestion-reactions.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ export default class ServerSuggestionReactions extends BotComponent {
102102
react_blacklist = (await import(config)).react_blacklist;
103103
}
104104
for (const channel_info of this.monitored_channels_infos) {
105-
const channel = await this.utilities.get_channel(channel_info.id, channel_info.name);
105+
const channel = await this.utilities.get_channel(channel_info.id, channel_info.name, [
106+
Discord.ChannelType.PublicThread,
107+
Discord.ChannelType.PrivateThread,
108+
Discord.ChannelType.AnnouncementThread,
109+
Discord.ChannelType.GuildText,
110+
]);
106111
assert(channel instanceof Discord.ThreadChannel || channel instanceof Discord.TextChannel);
107112
this.monitored_channels.set(channel_info.id, channel);
108113
}

0 commit comments

Comments
 (0)