Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 0 additions & 8 deletions src/commands/moderation/ban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions src/commands/moderation/kick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 1 addition & 9 deletions src/commands/moderation/mute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: <t:${Math.floor(expiresAt.getTime() / 1000)}:R>` : ''}`, components: [] });

} else if (confirmation.customId === 'cancel') {
await confirmation.update({ content: `${emojis.rightArrow2} Cancelled.`, components: [] });

setTimeout(() => {
interaction.deleteReply().catch(() => {});
}, 5000);
}
} catch (err) {
console.error(err)
Expand Down
8 changes: 0 additions & 8 deletions src/commands/moderation/unban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions src/commands/moderation/unmute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [] });
Expand Down
8 changes: 0 additions & 8 deletions src/commands/moderation/unwarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [] });
Expand Down
8 changes: 0 additions & 8 deletions src/commands/moderation/warn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down