Skip to content

Commit 9d0f416

Browse files
committed
error handling
1 parent 39da6c4 commit 9d0f416

File tree

1 file changed

+2
-5
lines changed
  • tooling/sparta/packages/discord/src/slashCommands/operators

1 file changed

+2
-5
lines changed

tooling/sparta/packages/discord/src/slashCommands/operators/chain-info.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ export const get = async (
66
interaction: ChatInputCommandInteraction
77
): Promise<string> => {
88
try {
9-
await interaction.deferReply({
10-
flags: MessageFlags.Ephemeral | MessageFlags.SuppressEmbeds,
11-
});
12-
139
// Get Ethereum instance
1410
const ethereum = await getEthereumInstance();
1511

@@ -22,13 +18,14 @@ export const get = async (
2218
proposerNow,
2319
} = await ethereum.getRollupInfo();
2420

25-
await interaction.editReply({
21+
await interaction.reply({
2622
content: `
2723
Pending block: [${pendingBlockNum}](https://aztecscan.xyz/blocks/${pendingBlockNum})
2824
Proven block: [${provenBlockNum}](https://aztecscan.xyz/blocks/${provenBlockNum})
2925
Current epoch: ${currentEpoch}
3026
Current slot: ${currentSlot}
3127
Proposer now: [${proposerNow}](https://sepolia.etherscan.io/address/${proposerNow})`,
28+
flags: MessageFlags.SuppressEmbeds,
3229
});
3330
return `Pending block: ${pendingBlockNum}\nProven block: ${provenBlockNum}\nCurrent epoch: ${currentEpoch}\nCurrent slot: ${currentSlot}\nProposer now: ${proposerNow}`;
3431
} catch (error) {

0 commit comments

Comments
 (0)