Type fixes for djs

This commit is contained in:
Dark 2021-06-30 04:56:56 +02:00
parent 653d6c1dc2
commit 0822fc15e5
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
130 changed files with 8877 additions and 411 deletions

View file

@ -1,4 +1,4 @@
import { Guild } from "discord.js";
import { Guild, Snowflake } from "discord.js";
import moment from "moment-timezone";
import { getRepository, Repository } from "typeorm";
import { renderTemplate } from "../templateFormatter";
@ -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.cache.get(msg.channel_id);
const channel = guild.channels.cache.get(msg.channel_id as Snowflake);
const user = { ...msg.data.author, id: msg.user_id };
const line = await renderTemplate(MESSAGE_ARCHIVE_MESSAGE_FORMAT, {