Skip to content

Commit

Permalink
debug: add logs to hivemind slash command;
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Sep 12, 2024
1 parent b39670c commit 5cc5444
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/commands/info/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default {
),

async execute(interaction: ChatInputCommandInteraction_broker) {
logger.info({ interaction_id: interaction.id, user: interaction.user }, 'question command started');
try {
const platform = await platformService.getPlatformByFilter({
name: 'discord',
Expand Down Expand Up @@ -50,8 +51,17 @@ export default {
type: 5,
data: { flags: 64 },
});
logger.info({ interaction_id: interaction.id, user: interaction.user }, 'question command ended');
} catch (error) {
logger.error(error, 'is failed');
await interactionService.createInteractionResponse(interaction, {
type: 4,
data: {
content:
"Sorry, we couldn't process your request at the moment. Please report this issue to the TogetherCrew development team. Thank you for your patience!",
flags: 64,
},
});
}
},
};

0 comments on commit 5cc5444

Please sign in to comment.