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

Commit

Permalink
fix: /user not working + update /filter list
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Jul 9, 2023
1 parent a046fd7 commit e6c2c87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
24 changes: 3 additions & 21 deletions src/commands/mod/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ module.exports = {
enabled: true,
hidden: true,
deferReply: true,
ephemeral: false,
ephemeral: true,
async execute(interaction, client, Discord) {
try {
if(interaction.options.getSubcommand() === "add") {
Expand Down Expand Up @@ -179,30 +179,12 @@ module.exports = {
blacklist: "Blacklist"
}

const embed = new Discord.EmbedBuilder()
const list = new Discord.EmbedBuilder()
.setColor(client.config_embeds.default)
.setTitle(`${filters[filter]} Filter`)
.setDescription(`\`${data.words.sort().join("\`, \`")}\``)

let msgURL = null;

try {
await interaction.user.send({ embeds: [embed] })
.then(msg => msgURL = `https://discord.com/channels/@me/${msg.channelId}/${msg.id}`)
} catch {
const error = new Discord.EmbedBuilder()
.setColor(client.config_embeds.error)
.setDescription(`${emoji.cross} I could not DM you!`)

await interaction.editReply({ embeds: [error] });
return;
}

const sent = new Discord.EmbedBuilder()
.setColor(client.config_embeds.default)
.setDescription(`💬 ${msgURL}`)

await interaction.editReply({ embeds: [sent] });
await interaction.editReply({ embeds: [list] });
return;
}

Expand Down
1 change: 1 addition & 0 deletions src/commands/mod/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
cooldown: 0,
enabled: true,
hidden: true,
deferReply: true,
ephemeral: true,
async execute(interaction, client, Discord) {
try {
Expand Down

0 comments on commit e6c2c87

Please sign in to comment.