Fix various environment-dependent compilation errors

pull/40/head
Skyler Grey 3 years ago
parent 1e462ab654
commit 5b78b42db8
Signed by: Minion3665
GPG Key ID: 1AFD10256B3C714D

@ -8,7 +8,7 @@ export const event = "guildBanAdd";
export async function callback(client: NucleusClient, ban: GuildBan) {
const { log, isLogging, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger;
await statsChannelRemove(client, undefined, ban.guild, ban.user);
await statsChannelRemove(ban.user, ban.guild);
purgeByUser(ban.user.id, ban.guild.id);
if (!(await isLogging(ban.guild.id, "guildMemberPunish"))) return;
const auditLog: GuildAuditLogsEntry | undefined = (await getAuditLog(ban.guild, AuditLogEvent.MemberBanAdd)).filter(

@ -9,7 +9,7 @@ export const event = "guildMemberRemove";
export async function callback(client: NucleusClient, member: GuildMember) {
const startTime = Date.now() - 10 * 1000;
purgeByUser(member.id, member.guild.id);
await statsChannelRemove(client, member);
await statsChannelRemove(member.user, member.guild);
const { getAuditLog, isLogging, log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
if (!(await isLogging(member.guild.id, "guildMemberUpdate"))) return;
const kickAuditLog = (await getAuditLog(member.guild as Guild, AuditLogEvent.MemberKick)).filter(

@ -16,10 +16,8 @@ import defaultData from "../config/default.js";
let username, password;
// @ts-expect-error
if (Object.keys(config.mongoOptions).includes("username")) username = encodeURIComponent(config.mongoOptions.username);
// @ts-expect-error
if (Object.keys(config.mongoOptions).includes("password")) password = encodeURIComponent(config.mongoOptions.password);
if ("username" in config.mongoOptions) username = encodeURIComponent(config.mongoOptions.username as string);
if ("password" in config.mongoOptions) password = encodeURIComponent(config.mongoOptions.password as string);
const mongoClient = new MongoClient(
username
@ -224,7 +222,7 @@ interface TranscriptSchema {
interface findDocSchema {
channelID: string;
messageID: string;
transcript: string;
code: string;
}
export class Transcript {

Loading…
Cancel
Save