Stop using client from the outer scope in channelDelete

pull/85/head
Skyler Grey 3 years ago
parent 22586d5cb4
commit ecab41bdf6
Signed by: Minion3665
GPG Key ID: 1AFD10256B3C714D

@ -8,7 +8,7 @@ import {
ThreadChannel,
VoiceChannel
} from "discord.js";
import client, { NucleusClient } from "../utils/client.js";
import _client, { NucleusClient } from "../utils/client.js";
import getEmojiByName from "../utils/getEmojiByName.js";
@ -48,7 +48,10 @@ export const event = "channelDelete";
// // }
// };
export async function callback(_client: NucleusClient, channel: GuildBasedChannel) {
export async function callback(client: NucleusClient, channel: GuildBasedChannel) {
// In future, please avoid using client from the outer scope. If you import client separately this
// parameter should shadow it.
// await deleteFromGuildConfig(channel)
const { getAuditLog, log, isLogging, NucleusColors, entry, renderDelta, renderUser } = client.logger;
if (!(await isLogging(channel.guild.id, "channelUpdate"))) return;

Loading…
Cancel
Save