mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
fix: use import.meta.env.
This commit is contained in:
1 parent
d68870c254
commit
c0d16b51de
10 files changed
+18
-18
No files matched your search
@@ -2,5 +2,5 @@ import { assertSecret } from '@blitzkit/core';
|
||||
import { ShardingManager } from 'discord.js';
|
||||
|
||||
export const manager = new ShardingManager('dist/bot/workers/bot.js', {
|
||||
token: assertSecret(process.env.DISCORD_TOKEN),
|
||||
token: assertSecret(import.meta.env.DISCORD_TOKEN),
|
||||
});
|
||||
@@ -115,7 +115,7 @@ export const commands = Promise.allSettled(COMMANDS_RAW).then((rawCommands) => {
|
||||
);
|
||||
});
|
||||
|
||||
const rest = new REST().setToken(assertSecret(process.env.DISCORD_TOKEN));
|
||||
const rest = new REST().setToken(assertSecret(import.meta.env.DISCORD_TOKEN));
|
||||
|
||||
commands.then((awaitedCommands) => {
|
||||
const body = Object.values(awaitedCommands).map((registry) =>
|
||||
@@ -123,7 +123,7 @@ commands.then((awaitedCommands) => {
|
||||
);
|
||||
|
||||
rest.put(
|
||||
Routes.applicationCommands(assertSecret(process.env.DISCORD_CLIENT_ID)),
|
||||
Routes.applicationCommands(assertSecret(import.meta.env.DISCORD_CLIENT_ID)),
|
||||
{
|
||||
body,
|
||||
},
|
||||
|
||||
@@ -6,4 +6,4 @@ console.log(`🟡 Launching bot ${client.shard?.ids[0]}`);
|
||||
|
||||
registerProcesses();
|
||||
|
||||
client.login(assertSecret(process.env.DISCORD_TOKEN));
|
||||
client.login(assertSecret(import.meta.env.DISCORD_TOKEN));
|
||||
Reference in new issue
Block a user