mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 11:39:51 +01:00
feat: detached cdn branch
This commit is contained in:
1 parent
ed041b78bb
commit
48dcbbc227
43 files changed
+267
-397
No files matched your search
@@ -33,7 +33,7 @@ import { searchPlayersCommand } from '../../commands/searchPlayers';
|
||||
import { statsCommand } from '../../commands/stats';
|
||||
import { todayCommand } from '../../commands/today';
|
||||
import { RenderConfiguration } from '../../core/blitzkit/renderConfiguration';
|
||||
import { secrets } from '../../core/blitzkit/secrets';
|
||||
import { assertSecrete } from '../../core/blitzkit/secrete';
|
||||
import handleAutocomplete from './handlers/autocomplete';
|
||||
import handleButton from './handlers/button';
|
||||
import handleChatInputCommand from './handlers/chatInputCommand';
|
||||
@@ -115,14 +115,19 @@ export const commands = Promise.allSettled(COMMANDS_RAW).then((rawCommands) => {
|
||||
);
|
||||
});
|
||||
|
||||
const rest = new REST().setToken(secrets.DISCORD_TOKEN);
|
||||
const rest = new REST().setToken(assertSecrete(process.env.DISCORD_TOKEN));
|
||||
|
||||
commands.then((awaitedCommands) => {
|
||||
const body = Object.values(awaitedCommands).map((registry) =>
|
||||
registry.command.toJSON(),
|
||||
);
|
||||
|
||||
rest.put(Routes.applicationCommands(secrets.DISCORD_CLIENT_ID), { body });
|
||||
rest.put(
|
||||
Routes.applicationCommands(assertSecrete(process.env.DISCORD_CLIENT_ID)),
|
||||
{
|
||||
body,
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
export default async function interactionCreate(
|
||||
|
||||
Reference in new issue
Block a user