From ae4e8335fdd4af3b3499ec90bad428b715d0fc39 Mon Sep 17 00:00:00 2001 From: Lioness100 Date: Mon, 27 Dec 2021 10:37:27 -0500 Subject: [PATCH] refactor: :recycle: don't use global Buffer or process I'm a sucker for "best practices" - nodejs/node#26334 --- src/commands/dev/eval.ts | 1 + src/config.ts | 1 + src/index.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index 9c51fd5..752d6b9 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -7,6 +7,7 @@ import { isThenable } from '@sapphire/utilities'; import { Stopwatch } from '@sapphire/stopwatch'; import { Command } from '#structures/Command'; import { inspect } from 'node:util'; +import { Buffer } from 'node:buffer'; import { Type } from '@sapphire/type'; // In the future, this may be converted to/accompanied with a context menu interaction diff --git a/src/config.ts b/src/config.ts index 7bd7daa..cef5426 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,5 @@ import { cleanEnv, str } from 'envalid'; +import process from 'node:process'; export const env = cleanEnv(process.env, { TOKEN: str({ desc: 'The discord bot token' }) diff --git a/src/index.ts b/src/index.ts index 24cf2a8..3dc9291 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,7 @@ import { GatewayIntentBits } from 'discord-api-types/v9'; import { yellow, green, bold } from 'colorette'; import { Constants } from 'discord.js'; import { env } from '#root/config'; +import process from 'node:process'; const client = new SapphireClient({ // Trace loggings clutter the console, and should only be used when debugging @sapphire/pieces specifically