diff --git a/guide/message-components/interactions.md b/guide/message-components/interactions.md index 8104fa352..af5014869 100644 --- a/guide/message-components/interactions.md +++ b/guide/message-components/interactions.md @@ -47,7 +47,7 @@ const collectorFilter = i => i.user.id === interaction.user.id; try { const confirmation = await response.resource.message.awaitMessageComponent({ filter: collectorFilter, time: 60_000 }); -} catch (e) { +} catch { await interaction.editReply({ content: 'Confirmation not received within 1 minute, cancelling', components: [] }); } ``` @@ -75,7 +75,7 @@ try { } else if (confirmation.customId === 'cancel') { await confirmation.update({ content: 'Action cancelled', components: [] }); } -} catch (e) { +} catch { await interaction.editReply({ content: 'Confirmation not received within 1 minute, cancelling', components: [] }); } ``` diff --git a/guide/voice/voice-connections.md b/guide/voice/voice-connections.md index 6a95ca61a..e07831590 100644 --- a/guide/voice/voice-connections.md +++ b/guide/voice/voice-connections.md @@ -111,7 +111,7 @@ connection.on(VoiceConnectionStatus.Disconnected, async (oldState, newState) => entersState(connection, VoiceConnectionStatus.Connecting, 5_000), ]); // Seems to be reconnecting to a new channel - ignore disconnect - } catch (error) { + } catch { // Seems to be a real disconnect which SHOULDN'T be recovered from connection.destroy(); }