3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-07 19:17:19 +00:00

Added Discord attachment link reaction, fixed emoji configuration and moved util functions

This commit is contained in:
Lily Bergonzat 2024-02-16 11:51:58 +01:00
parent a4c4b17a14
commit 592d037148
173 changed files with 1540 additions and 1170 deletions

View file

@ -1,8 +1,9 @@
import { Snowflake } from "discord.js";
import moment from "moment-timezone";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { isOwner, sendErrorMessage } from "../../../pluginUtils";
import { isOwner } from "../../../pluginUtils";
import { SECONDS, confirm, noop, renderUsername } from "../../../utils";
import { CommonPlugin } from "../../Common/CommonPlugin";
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
import { rehostAttachment } from "../rehostAttachment";
import { channelArchiverCmd } from "../types";
@ -32,12 +33,12 @@ export const ArchiveChannelCmd = channelArchiverCmd({
async run({ message: msg, args, pluginData }) {
if (!args["attachment-channel"]) {
const confirmed = await confirm(msg.channel, msg.author.id, {
const confirmed = await confirm(msg, msg.author.id, {
content:
"No `-attachment-channel` specified. Continue? Attachments will not be available in the log if their message is deleted.",
});
if (!confirmed) {
sendErrorMessage(pluginData, msg.channel, "Canceled");
pluginData.getPlugin(CommonPlugin).sendErrorMessage(msg, "Canceled");
return;
}
}