Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
feat: priority embed
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Jun 24, 2023
1 parent c525ddd commit 4dd41c8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/buttons/add-todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@ module.exports = {
.setDescription(todoList.length ? todoList.join("\n") : "*There are no tasks.*")
.setTimestamp()

const priorityEmbed = new Discord.EmbedBuilder()
.setTitle("Priority")
.setDescription(`🔴 High\n🟠 Medium\n🟢 Low\n⚪ None`)

try {
await message.edit({ embeds: [list] });
await message.edit({ embeds: [list, priorityEmbed] });
} catch {}
}
})
Expand Down
6 changes: 5 additions & 1 deletion src/buttons/refresh-todo-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ module.exports = {
.setDescription(todoList.length ? todoList.join("\n") : "*There are no tasks.*")
.setTimestamp()

const priorityEmbed = new Discord.EmbedBuilder()
.setTitle("Priority")
.setDescription(`🔴 High\n🟠 Medium\n🟢 Low\n⚪ None`)

try {
await interaction.message.edit({ embeds: [list] });
await interaction.message.edit({ embeds: [list, priorityEmbed] });
} catch {}

await interaction.deferUpdate();
Expand Down
6 changes: 5 additions & 1 deletion src/buttons/remove-todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ module.exports = {
.setDescription(todoList.length ? todoList.join("\n") : "*There are no tasks.*")
.setTimestamp()

const priorityEmbed = new Discord.EmbedBuilder()
.setTitle("Priority")
.setDescription(`🔴 High\n🟠 Medium\n🟢 Low\n⚪ None`)

try {
await message.edit({ embeds: [list] });
await message.edit({ embeds: [list, priorityEmbed] });
} catch {}
}
})
Expand Down
6 changes: 5 additions & 1 deletion src/commands/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ module.exports = {
.setDescription(todoList.length ? todoList.join("\n") : "*There are no tasks.*")
.setTimestamp()

const priorityEmbed = new Discord.EmbedBuilder()
.setTitle("Priority")
.setDescription(`🔴 High\n🟠 Medium\n🟢 Low\n⚪ None`)

const actions = new Discord.ActionRowBuilder()
.addComponents (
new Discord.ButtonBuilder()
Expand Down Expand Up @@ -530,7 +534,7 @@ module.exports = {
)

try {
await appealChannel.send({ embeds: [list], components: [actions, listActions] });
await appealChannel.send({ embeds: [list, priorityEmbed], components: [actions, listActions] });

const sent = new Discord.EmbedBuilder()
.setColor(client.config_embeds.default)
Expand Down

0 comments on commit 4dd41c8

Please sign in to comment.