3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-23 01:25:02 +00:00

Fix thread channels not working for reminders

This commit is contained in:
Dark 2021-09-12 17:29:54 +02:00
parent f733f081e0
commit 6465399dbd
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8

View file

@ -13,7 +13,7 @@ export async function postDueRemindersLoop(pluginData: GuildPluginData<Reminders
const pendingReminders = await pluginData.state.reminders.getDueReminders();
for (const reminder of pendingReminders) {
const channel = pluginData.guild.channels.cache.get(reminder.channel_id as Snowflake);
if (channel && channel instanceof TextChannel) {
if (channel && channel.isText()) {
try {
// Only show created at date if one exists
if (moment.utc(reminder.created_at).isValid()) {