3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

Pre-plugin moves

This commit is contained in:
Dark 2021-05-31 21:12:24 +02:00
parent 9509be5e65
commit 92cf7f31f9
13 changed files with 62 additions and 52 deletions

View file

@ -4,8 +4,8 @@ import { getRepository, Repository } from "typeorm";
import { BaseGuildRepository } from "./BaseGuildRepository";
import { trimLines } from "../utils";
import { SavedMessage } from "./entities/SavedMessage";
import { Guild } from "eris";
import { renderTemplate } from "../templateFormatter";
import { Guild } from "discord.js";
const DEFAULT_EXPIRY_DAYS = 30;
@ -73,7 +73,7 @@ export class GuildArchives extends BaseGuildRepository {
protected async renderLinesFromSavedMessages(savedMessages: SavedMessage[], guild: Guild) {
const msgLines: string[] = [];
for (const msg of savedMessages) {
const channel = guild.channels.get(msg.channel_id);
const channel = guild.channels.cache.get(msg.channel_id);
const user = { ...msg.data.author, id: msg.user_id };
const line = await renderTemplate(MESSAGE_ARCHIVE_MESSAGE_FORMAT, {