mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-28 04:59:50 +01:00
feat: verbose logging for all commands
This commit is contained in:
1 parent
1c4cb67a6a
commit
78d429808a
5 files changed
+17
-4
No files matched your search
@@ -35,4 +35,4 @@ jobs:
|
|||||||
unzip dist.zip
|
unzip dist.zip
|
||||||
|
|
||||||
- name: Run index.cjs
|
- 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
|
||||||
@@ -7,3 +7,4 @@ package-lock.json
|
|||||||
dist/
|
dist/
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
dist.zip
|
dist.zip
|
||||||
|
commands.txt
|
||||||
+3
-1
@@ -19,9 +19,11 @@ build({
|
|||||||
'.ttf': 'file',
|
'.ttf': 'file',
|
||||||
},
|
},
|
||||||
|
|
||||||
bundle: isProd,
|
bundle: true,
|
||||||
sourcemap: isProd,
|
sourcemap: isProd,
|
||||||
minifyIdentifiers: false, // causes errors
|
minifyIdentifiers: false, // causes errors
|
||||||
minifySyntax: isProd,
|
minifySyntax: isProd,
|
||||||
minifyWhitespace: isProd,
|
minifyWhitespace: isProd,
|
||||||
|
|
||||||
|
logLevel: isProd ? 'info' : 'silent',
|
||||||
});
|
});
|
||||||
@@ -27,7 +27,7 @@ import { PlayerClanData } from '../types/playerClanData.js';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
inProduction: true,
|
inProduction: true,
|
||||||
inDevelopment: false,
|
inDevelopment: true,
|
||||||
inPublic: true,
|
inPublic: true,
|
||||||
|
|
||||||
command: new SlashCommandBuilder()
|
command: new SlashCommandBuilder()
|
||||||
|
|||||||
@@ -146,7 +146,17 @@ export default async function interactionCreate(
|
|||||||
return;
|
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();
|
await interaction.deferReply();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in new issue
Block a user