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

Commit

Permalink
feat: shorten code + rename btn
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Jul 5, 2023
1 parent 4d0a4a4 commit 42fa9c1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const emoji = require("../../config.json").emojis;
const devSchema = require("../../models/devSchema");

module.exports = {
name: "sentry-capture",
name: "sentry-capture-token",
startsWith: true,
async execute(interaction, client, Discord) {
const dev = await devSchema.exists({ _id: interaction.user.id });
Expand All @@ -17,7 +17,7 @@ module.exports = {
return;
}

const token = interaction.customId.replace("sentry-capture-", "");
const token = interaction.customId.replace("sentry-capture-token-", "");

const info = new Discord.EmbedBuilder()
.setColor(client.config_embeds.default)
Expand Down
2 changes: 1 addition & 1 deletion src/buttons/sentry/delete-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ module.exports = {

await interaction.deferUpdate();

await interaction.message.edit({ embeds: interaction.message.embeds, components: interaction.message.components, files: [] });
await interaction.message.edit({ embeds: interaction.message.embeds, components: interaction.message.components });
}
}
2 changes: 1 addition & 1 deletion src/buttons/sentry/ignore-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ module.exports = {

await interaction.deferUpdate();

await interaction.message.edit({ embeds: interaction.message.embeds, components: interaction.message.components, files: [] });
await interaction.message.edit({ embeds: interaction.message.embeds, components: interaction.message.components });
}
}
2 changes: 1 addition & 1 deletion src/buttons/sentry/resolve-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ module.exports = {

await interaction.deferUpdate();

await interaction.message.edit({ embeds: interaction.message.embeds, components: interaction.message.components, files: [] });
await interaction.message.edit({ embeds: interaction.message.embeds, components: interaction.message.components });
}
}
2 changes: 1 addition & 1 deletion src/commands/dev/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ module.exports = {
.addComponents (
new Discord.ButtonBuilder()
.setStyle(Discord.ButtonStyle.Secondary)
.setCustomId(`sentry-capture-${id}`)
.setCustomId(`sentry-capture-token-${id}`)
.setEmoji("ℹ️")
)

Expand Down

0 comments on commit 42fa9c1

Please sign in to comment.