diff --git a/README.md b/README.md index a2780f4..800a480 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ An opensource modern Discord Bot built for moderation, utilities and support! +## Discord Server + +Quest's Official Discord Server can be joined using the following link: + +https://discord.gg/ksuqZ77R88 + +Thanks! + ## Running locally 1. Clone the repository. diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index 51c210a..d3fd158 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -100,16 +100,8 @@ export default { console.error(err) await confirmation.update({ content: `${emojis.rightArrow2} Failed to ban <@${targetMember.user.id}> with reason: ${reason}`, components: [] }); } - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } else if (confirmation.customId === 'cancel') { await confirmation.update({ content: `${emojis.rightArrow2} Cancelled.`, components: [] }); - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } } catch (err) { console.error(err) diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index bf684de..1901228 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -89,16 +89,8 @@ export default { console.error(err) await confirmation.update({ content: `${emojis.rightArrow2} Failed to kick <@${targetMember.user.id}> with reason: ${reason}\nYou must have had a real ick towards that person.`, components: [] }); } - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } else if (confirmation.customId === 'cancel') { await confirmation.update({ content: `${emojis.rightArrow2} Cancelled.`, components: [] }); - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } } catch (err) { console.error(err) diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index c5570b9..774ab00 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -101,18 +101,10 @@ export default { ).catch(() => {}); await enforceMute(interaction.guild, targetMember.id); - await confirmation.update({ content: `${emojis.rightArrow2} <@${targetMember.user.id}> has been muted with reason: ${reason}`, components: [] }); - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); + await confirmation.update({ content: `${emojis.rightArrow2} <@${targetMember.user.id}> has been muted with reason: ${reason}${expiresAt ? `\nExpires: ` : ''}`, components: [] }); } else if (confirmation.customId === 'cancel') { await confirmation.update({ content: `${emojis.rightArrow2} Cancelled.`, components: [] }); - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } } catch (err) { console.error(err) diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts index 147f333..490bea6 100644 --- a/src/commands/moderation/unban.ts +++ b/src/commands/moderation/unban.ts @@ -81,16 +81,8 @@ export default { console.error(err) await confirmation.update({ content: `${emojis.rightArrow2} Failed to unban <@${targetMember.id}> with reason: ${reason}`, components: [] }); } - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } else if (confirmation.customId === 'cancel') { await confirmation.update({ content: `${emojis.rightArrow2} Cancelled.`, components: [] }); - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } } catch (err) { console.error(err) diff --git a/src/commands/moderation/unmute.ts b/src/commands/moderation/unmute.ts index dd0f5f9..4834135 100644 --- a/src/commands/moderation/unmute.ts +++ b/src/commands/moderation/unmute.ts @@ -84,16 +84,8 @@ export default { console.error(err); await confirmation.update({ content: `${emojis.rightArrow2} Failed to unmute <@${targetMember.id}> with reason: ${reason}`, components: [] }); } - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } else if (confirmation.customId === 'cancel') { await confirmation.update({ content: `${emojis.rightArrow2} Cancelled.`, components: [] }); - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } } catch { await interaction.editReply({ content: `${emojis.rightArrow2} No response within a minute or errored.`, components: [] }); diff --git a/src/commands/moderation/unwarn.ts b/src/commands/moderation/unwarn.ts index 7696544..61b6046 100644 --- a/src/commands/moderation/unwarn.ts +++ b/src/commands/moderation/unwarn.ts @@ -78,16 +78,8 @@ export default { console.error(`Failed to remove warn ${warn.id}:`, err); await confirmation.update({ content: `${emojis.rightArrow2} Failed to remove warn \`${warn.id}\` from <@${warn.userId}>.`, components: [] }); } - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } else if (confirmation.customId === 'cancel') { await confirmation.update({ content: `${emojis.rightArrow2} Cancelled.`, components: [] }); - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } } catch { await interaction.editReply({ content: `${emojis.rightArrow2} No response within a minute or errored.`, components: [] }); diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index 232d399..b6455f8 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -104,16 +104,8 @@ export default { console.error(err) await confirmation.update({ content: `${emojis.rightArrow2} Failed to warn <@${targetMember.id}>`, components: [] }) } - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } else if (confirmation.customId === 'cancel') { await confirmation.update({ content: `${emojis.rightArrow2} Cancelled.`, components: [] }); - - setTimeout(() => { - interaction.deleteReply().catch(() => {}); - }, 5000); } } catch(err) { console.error(err)