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

Merge branch 'master' of github.com:ZeppelinBot/Zeppelin into feat/application-commands

This commit is contained in:
Lily Bergonzat 2024-02-16 14:26:34 +01:00
commit 2c0e4b37ca
235 changed files with 3464 additions and 4799 deletions

View file

@ -1,18 +1,15 @@
import * as t from "io-ts";
import { makeIoTsConfigParser } from "../../pluginUtils";
import z from "zod";
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { ArchiveChannelCmd } from "./commands/ArchiveChannelCmd";
import { ChannelArchiverPluginType } from "./types";
const ConfigSchema = t.type({});
export const ChannelArchiverPlugin = zeppelinGuildPlugin<ChannelArchiverPluginType>()({
name: "channel_archiver",
showInDocs: false,
dependencies: () => [TimeAndDatePlugin],
configParser: makeIoTsConfigParser(ConfigSchema),
configParser: (input) => z.strictObject({}).parse(input),
// prettier-ignore
messageCommands: [

View file

@ -69,10 +69,9 @@ export const ArchiveChannelCmd = channelArchiverCmd({
for (const message of messages.values()) {
const ts = moment.utc(message.createdTimestamp).format("YYYY-MM-DD HH:mm:ss");
let content = `[${ts}] [${message.author.id}] [${renderUsername(
message.author.username,
message.author.discriminator,
)}]: ${message.content || "<no text content>"}`;
let content = `[${ts}] [${message.author.id}] [${renderUsername(message.author)}]: ${
message.content || "<no text content>"
}`;
if (message.attachments.size) {
if (args["attachment-channel"]) {