diff --git a/backend/src/plugins/Reminders/functions/postReminder.ts b/backend/src/plugins/Reminders/functions/postReminder.ts index 665fc3fb..d96ad7b6 100644 --- a/backend/src/plugins/Reminders/functions/postReminder.ts +++ b/backend/src/plugins/Reminders/functions/postReminder.ts @@ -1,10 +1,10 @@ import { GuildPluginData } from "knub"; import { RemindersPluginType } from "../types"; import { Reminder } from "../../../data/entities/Reminder"; -import { Snowflake, TextChannel } from "discord.js"; +import { DiscordAPIError, HTTPError, Snowflake, TextChannel } from "discord.js"; import moment from "moment-timezone"; import { disableLinkPreviews } from "knub/dist/helpers"; -import { DBDateFormat, SECONDS } from "../../../utils"; +import { DBDateFormat, isDiscordHTTPError, SECONDS } from "../../../utils"; import humanizeDuration from "humanize-duration"; export async function postReminder(pluginData: GuildPluginData, reminder: Reminder) { @@ -31,10 +31,13 @@ export async function postReminder(pluginData: GuildPluginData= 500) { + // If we get a server error, try again later + return; + } } }