feat: verbose logging for all commands

This commit is contained in:
TresAbhi committed 2023-06-17 18:05:04 +00:00
1 parent 1c4cb67a6a
commit 78d429808a
5 files changed
+18 -5

No files matched your search

+1 -1
View File
@@ -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
View File
@@ -6,4 +6,5 @@ package-lock.json
/playwright/.cache/
dist/
yarn-error.log
dist.zip
dist.zip
commands.txt
+3 -1
View File
@@ -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',
});
+1 -1
View File
@@ -27,7 +27,7 @@ import { PlayerClanData } from '../types/playerClanData.js';
export default {
inProduction: true,
inDevelopment: false,
inDevelopment: true,
inPublic: true,
command: new SlashCommandBuilder()
+11 -1
View File
@@ -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 {