3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-11 04:45:02 +00:00

Type fixes + circular dependency fix

This commit is contained in:
Dragory 2021-08-18 20:01:06 +03:00
parent e3b6b017a2
commit 59e75e0584
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
20 changed files with 70 additions and 83 deletions

View file

@ -192,7 +192,7 @@ export async function actualPostCmd(
date: postAt.format(timeAndDate.getDateFormat("date")),
time: postAt.format(timeAndDate.getDateFormat("time")),
repeatInterval: humanizeDuration(opts.repeat),
repeatDetails: repeatDetailsStr,
repeatDetails: repeatDetailsStr ?? "",
});
}

View file

@ -4,7 +4,7 @@ import moment from "moment-timezone";
import { channelToTemplateSafeChannel, userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
import { LogType } from "../../../data/LogType";
import { logger } from "../../../logger";
import { DBDateFormat, SECONDS } from "../../../utils";
import { DBDateFormat, SECONDS, verboseChannelMention, verboseUserMention } from "../../../utils";
import { PostPluginType } from "../types";
import { postMessage } from "./postMessage";
import { LogsPlugin } from "../../Logs/LogsPlugin";
@ -38,9 +38,9 @@ export async function scheduledPostLoop(pluginData: GuildPluginData<PostPluginTy
});
} catch {
pluginData.getPlugin(LogsPlugin).logBotAlert({
body: `Failed to post scheduled message by {userMention(author)} to {channelMention(channel)}`,
channel,
author,
body: `Failed to post scheduled message by ${verboseUserMention(author)} to ${verboseChannelMention(
channel,
)}`,
});
logger.warn(
`Failed to post scheduled message to #${channel.name} (${channel.id}) on ${pluginData.guild.name} (${pluginData.guild.id})`,