mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: verbose logging for all commands
This commit is contained in:
1 parent
1c4cb67a6a
commit
78d429808a
5 files changed
+18
-5
No files matched your search
@@ -35,4 +35,4 @@ jobs:
|
||||
unzip dist.zip
|
||||
|
||||
- name: Run index.cjs
|
||||
run: NODE_ENV=production DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} WARGAMING_APPLICATION_ID=${{ secrets.WARGAMING_APPLICATION_ID }} node --enable-source-maps index.cjs
|
||||
run: NODE_ENV=production DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} WARGAMING_APPLICATION_ID=${{ secrets.WARGAMING_APPLICATION_ID }} node --enable-source-maps --trace-warnings index.cjs
|
||||
+2
-1
@@ -6,4 +6,5 @@ package-lock.json
|
||||
/playwright/.cache/
|
||||
dist/
|
||||
yarn-error.log
|
||||
dist.zip
|
||||
dist.zip
|
||||
commands.txt
|
||||
+3
-1
@@ -19,9 +19,11 @@ build({
|
||||
'.ttf': 'file',
|
||||
},
|
||||
|
||||
bundle: isProd,
|
||||
bundle: true,
|
||||
sourcemap: isProd,
|
||||
minifyIdentifiers: false, // causes errors
|
||||
minifySyntax: isProd,
|
||||
minifyWhitespace: isProd,
|
||||
|
||||
logLevel: isProd ? 'info' : 'silent',
|
||||
});
|
||||
@@ -27,7 +27,7 @@ import { PlayerClanData } from '../types/playerClanData.js';
|
||||
|
||||
export default {
|
||||
inProduction: true,
|
||||
inDevelopment: false,
|
||||
inDevelopment: true,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -146,7 +146,17 @@ export default async function interactionCreate(
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(interaction.toString());
|
||||
const metadata = [
|
||||
`${interaction.user.id} (${interaction.user.username})`,
|
||||
`${interaction.guildId}/${interaction.channelId} (${interaction.guild?.name})`,
|
||||
new Date(),
|
||||
];
|
||||
|
||||
console.log(
|
||||
`${interaction.toString()}\n${metadata
|
||||
.map((item) => ` ${item}`)
|
||||
.join('\n')}`,
|
||||
);
|
||||
await interaction.deferReply();
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user