pass root logger, don't init new ones

This commit is contained in:
JT2M0L3Y
2026-10-21 19:31:02 -07:00
parent 217291e531
commit 288c0eb08f
16 changed files with 56 additions and 62 deletions
+2 -4
View File
@@ -1,15 +1,13 @@
import { Client, CommandInteraction, MessageFlags } from 'discord.js'
import { AdminCommand, SlashCommand } from '../utils/index.js'
import { createLogger } from '../components/index.js'
const logger = createLogger({ component: 'command', command: 'shutoff' })
import type { Logger as PinoLogger } from 'pino'
export const Shutoff: SlashCommand = {
name: 'shutoff',
description: 'shutdown the bot. You will need to manually bring it online again. Administrator Only.',
// Query for message information and set the style
run: async (client: Client, interaction: CommandInteraction) => {
run: async (client: Client, interaction: CommandInteraction, logger: PinoLogger) => {
// fetch channel and message
const channel = await client.channels.fetch(interaction.channelId)
if (!channel || !AdminCommand.includes(channel.type)) return