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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# ⚠️ This repository is no longer maintained ⚠️
# Leave Switcher for TransPlace/EnbyPlace

We suggest looking at [TransGG/leave-switcher](https://github.com/TransGG/leave-switcher) instead...
This bot handles switching on-leave status for TransPlace/EnbyPlace/StaffPlace, allowing staff to easily switch all of their roles to be visibly on leave and remove their own access to their staff powers until they switch back off leave.
6 changes: 3 additions & 3 deletions commands/example/onleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ exports.slash = async (client, interaction) => {
})
}
exports.modal = async (client, interaction) => {
await interaction.deferReply({ ephemeral: true });

// get their reason and duration

Expand Down Expand Up @@ -93,15 +94,14 @@ exports.modal = async (client, interaction) => {
}
)

interaction.reply({
interaction.editReply({
embeds: [
new EmbedBuilder()
.setTitle('Successfully switched on-leave status.')
.setDescription(`Provided Reason: ${reason}\nProvided Duration: ${duration}`)
.addFields(switched)
.setTimestamp()
],
ephemeral: true
]
})

let logChannel = await client.channels.cache.get(client.config.logChannel)
Expand Down