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

Commit

Permalink
feat: remove img from /dev errors + update todo
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Jun 25, 2023
1 parent 87800d1 commit 58f0239
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
Binary file removed src/assets/sentry-glyph-light-400x352.png
Binary file not shown.
16 changes: 8 additions & 8 deletions src/commands/developer/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,13 +506,8 @@ module.exports = {
)
.setTimestamp()

const actions = new Discord.ActionRowBuilder()
const row1 = new Discord.ActionRowBuilder()
.addComponents (
new Discord.ButtonBuilder()
.setStyle(Discord.ButtonStyle.Secondary)
.setCustomId("get-todo")
.setLabel("Get Task"),

new Discord.ButtonBuilder()
.setStyle(Discord.ButtonStyle.Success)
.setCustomId("add-todo")
Expand All @@ -524,16 +519,21 @@ module.exports = {
.setLabel("Remove Task")
)

const listActions = new Discord.ActionRowBuilder()
const row2 = new Discord.ActionRowBuilder()
.addComponents (
new Discord.ButtonBuilder()
.setStyle(Discord.ButtonStyle.Secondary)
.setCustomId("get-todo")
.setLabel("Get Task"),

new Discord.ButtonBuilder()
.setStyle(Discord.ButtonStyle.Primary)
.setCustomId("refresh-todo-list")
.setLabel("Refresh")
)

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

const sent = new Discord.EmbedBuilder()
.setColor(client.config_embeds.default)
Expand Down
9 changes: 2 additions & 7 deletions src/commands/developer/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ module.exports = {
}

if(interaction.options.getSubcommand() === "errors") {
const path = require("path");

const image = path.resolve("./src/assets/sentry-glyph-light-400x352.png");

const result = await fetch(`https://sentry.io/api/0/projects/${process.env.sentry_org}/${process.env.sentry_project}/issues/`, {
headers: {
Authorization: `Bearer ${process.env.sentry_bearer}`
Expand All @@ -46,7 +42,7 @@ module.exports = {
if(!result.length) {
const error = new Discord.EmbedBuilder()
.setColor(client.config_embeds.error)
.setDescription(`${emoji.error} There are no unresolved issues on Sentry!`)
.setDescription(`${emoji.error} There are no unresolved issues!`)

await interaction.editReply({ embeds: [error], ephemeral: true });
return;
Expand All @@ -60,7 +56,6 @@ module.exports = {

const data = new Discord.EmbedBuilder()
.setColor(client.config_embeds.default)
.setThumbnail("attachment://sentry-glyph-light-400x352.png")
.setTitle("Unresolved Issues")
.setDescription(issues.join("\n"))

Expand All @@ -72,7 +67,7 @@ module.exports = {
.setLabel("Resolve All")
)

await interaction.editReply({ embeds: [data], components: [action], files: [image] });
await interaction.editReply({ embeds: [data], components: [action] });
return;
}
} catch(err) {
Expand Down

0 comments on commit 58f0239

Please sign in to comment.