Updated commands

This commit is contained in:
EmotionChild 2022-12-02 21:54:36 +13:00
parent ed2e644827
commit 3d9c0667bc
No known key found for this signature in database
GPG key ID: 15EBDFF858B9A65A
10 changed files with 581 additions and 422 deletions

View file

@ -1,48 +1,51 @@
const Discord = require("discord.js");
const messages = require("../utils/messages"); const messages = require("../utils/messages");
module.exports = { module.exports = {
description: "Create a drop giveaway",
description: 'Create a drop giveaway',
options: [ options: [
{ {
name: 'winners', name: "winners",
description: 'How many winners the giveaway should have', description: "How many winners the giveaway should have",
type: 'INTEGER', type: Discord.ApplicationCommandOptionType.Integer,
required: true required: true,
}, },
{ {
name: 'prize', name: "prize",
description: 'What the prize of the giveaway should be', description: "What the prize of the giveaway should be",
type: 'STRING', type: Discord.ApplicationCommandOptionType.String,
required: true required: true,
}, },
{ {
name: 'channel', name: "channel",
description: 'The channel to start the giveaway in', description: "The channel to start the giveaway in",
type: 'CHANNEL', type: Discord.ApplicationCommandOptionType.Channel,
required: true required: true,
} },
], ],
run: async (client, interaction) => { run: async (client, interaction) => {
// If the member doesn't have enough permissions // If the member doesn't have enough permissions
if(!interaction.member.permissions.has('MANAGE_MESSAGES') && !interaction.member.roles.cache.some((r) => r.name === "Giveaways")){ if (
!interaction.member.permissions.has("MANAGE_MESSAGES") &&
!interaction.member.roles.cache.some((r) => r.name === "Giveaways")
) {
return interaction.reply({ return interaction.reply({
content: ':x: You need to have the manage messages permissions to start giveaways.', content:
ephemeral: true ":x: You need to have the manage messages permissions to start giveaways.",
ephemeral: true,
}); });
} }
const giveawayChannel = interaction.options.getChannel('channel'); const giveawayChannel = interaction.options.getChannel("channel");
const giveawayWinnerCount = interaction.options.getInteger('winners'); const giveawayWinnerCount = interaction.options.getInteger("winners");
const giveawayPrize = interaction.options.getString('prize'); const giveawayPrize = interaction.options.getString("prize");
if(!giveawayChannel.isText()) { if (!giveawayChannel.isTextBased()) {
return interaction.reply({ return interaction.reply({
content: ':x: Selected channel is not text-based.', content: ":x: Selected channel is not text-based.",
ephemeral: true ephemeral: true,
}); });
} }
@ -57,10 +60,9 @@ module.exports = {
// specify drop // specify drop
isDrop: true, isDrop: true,
// Messages // Messages
messages messages,
}); });
interaction.reply(`Giveaway started in ${giveawayChannel}!`); interaction.reply(`Giveaway started in ${giveawayChannel}!`);
},
}
}; };

View file

@ -1,65 +1,71 @@
const ms = require('ms'); const Discord = require("discord.js");
module.exports = { module.exports = {
description: "End a giveaway",
description: 'End a giveaway',
options: [ options: [
{ {
name: 'giveaway', name: "giveaway",
description: 'The giveaway to end (message ID or giveaway prize)', description: "The giveaway to end (message ID or giveaway prize)",
type: 'STRING', type: Discord.ApplicationCommandOptionType.String,
required: true required: true,
} },
], ],
run: async (client, interaction) => { run: async (client, interaction) => {
// If the member doesn't have enough permissions // If the member doesn't have enough permissions
if(!interaction.member.permissions.has('MANAGE_MESSAGES') && !interaction.member.roles.cache.some((r) => r.name === "Giveaways")){ if (
!interaction.member.permissions.has("MANAGE_MESSAGES") &&
!interaction.member.roles.cache.some((r) => r.name === "Giveaways")
) {
return interaction.reply({ return interaction.reply({
content: ':x: You need to have the manage messages permissions to end giveaways.', content:
ephemeral: true ":x: You need to have the manage messages permissions to end giveaways.",
ephemeral: true,
}); });
} }
const query = interaction.options.getString('giveaway'); const query = interaction.options.getString("giveaway");
// try to found the giveaway with prize then with ID // try to found the giveaway with prize then with ID
const giveaway = const giveaway =
// Search with giveaway prize // Search with giveaway prize
client.giveawaysManager.giveaways.find((g) => g.prize === query && g.guildId === interaction.guild.id) || client.giveawaysManager.giveaways.find(
(g) => g.prize === query && g.guildId === interaction.guild.id
) ||
// Search with giveaway ID // Search with giveaway ID
client.giveawaysManager.giveaways.find((g) => g.messageId === query && g.guildId === interaction.guild.id); client.giveawaysManager.giveaways.find(
(g) => g.messageId === query && g.guildId === interaction.guild.id
);
// If no giveaway was found // If no giveaway was found
if (!giveaway) { if (!giveaway) {
return interaction.reply({ return interaction.reply({
content: 'Unable to find a giveaway for `'+ query + '`.', content: "Unable to find a giveaway for `" + query + "`.",
ephemeral: true ephemeral: true,
}); });
} }
if (giveaway.ended) { if (giveaway.ended) {
return interaction.reply({ return interaction.reply({
content: 'This giveaway is already ended.', content: "This giveaway is already ended.",
ephemeral: true ephemeral: true,
}); });
} }
// Edit the giveaway // Edit the giveaway
client.giveawaysManager.end(giveaway.messageId) client.giveawaysManager
.end(giveaway.messageId)
// Success message // Success message
.then(() => { .then(() => {
// Success message // Success message
interaction.reply('Giveaway ended!'); interaction.reply("Giveaway ended!");
}) })
.catch((e) => { .catch((e) => {
interaction.reply({ interaction.reply({
content: e, content: e,
ephemeral: true ephemeral: true,
}); });
}); });
},
}
}; };

View file

@ -1,41 +1,37 @@
const message = require('../utils/messages'); const messages = require("../utils/messages");
const { const { EmbedBuilder, MessageActionRow, MessageButton } = require("discord.js");
MessageEmbed,
MessageActionRow,
MessageButton
} = require('discord.js');
module.exports = { module.exports = {
name: "help", name: "help",
description: "Get all Bot Commands", description: "Get all Bot Commands",
run: async (client, interaction) => { run: async (client, interaction) => {
let helpembed = new EmbedBuilder();
let helpembed = new MessageEmbed() helpembed.setColor("RANDOM");
helpembed.setColor("RANDOM") helpembed.setAuthor({ name: `Commands of ${client.user.username}` });
helpembed.setAuthor( helpembed.setColor("#2f3136");
`Commands of ${client.user.username}` helpembed.setThumbnail(
) "https://cdn.discordapp.com/avatars/608119997713350679/d71c7cbb2ba132867367ed47261aea6d.png"
helpembed.setColor("#2f3136") );
helpembed.setThumbnail("https://cdn.discordapp.com/avatars/608119997713350679/d71c7cbb2ba132867367ed47261aea6d.png")
client.commands.map((cmd) => { client.commands.map((cmd) => {
helpembed.addField( helpembed.addField(`\`${cmd.name}\``, `${cmd.description}`, true);
`\`${cmd.name}\``, });
`${cmd.description}`, helpembed.setTimestamp();
true helpembed.setFooter({ text: `© EmotionChild | Have a nice day!` });
);
})
helpembed.setTimestamp()
helpembed.setFooter(`© EmotionChild | Have a nice day!`);
const row = new MessageActionRow() const row = new MessageActionRow().addComponents(
.addComponents(
new MessageButton() new MessageButton()
.setEmoji('865572290065072128') .setEmoji("865572290065072128")
.setLabel(`Invite ${client.user.username}`) .setLabel(`Invite ${client.user.username}`)
.setURL(`https://discord.com/api/oauth2/authorize?client_id=726333575091454002&permissions=8&scope=bot%20applications.commands`) .setURL(
.setStyle('LINK'), `https://discord.com/api/oauth2/authorize?client_id=726333575091454002&permissions=8&scope=bot%20applications.commands`
)
.setStyle("LINK")
); );
await interaction.reply({ embeds: [helpembed],components: [row], ephemeral: true }); await interaction.reply({
embeds: [helpembed],
components: [row],
ephemeral: true,
});
}, },
}; };

View file

@ -1,29 +1,30 @@
const messages = require('../utils/messages'); const messages = require("../utils/messages");
const { const { EmbedBuilder, MessageActionRow, MessageButton } = require("discord.js");
MessageEmbed,
MessageActionRow,
MessageButton
} = require('discord.js');
module.exports = { module.exports = {
name: "invite", name: "invite",
description: "Get Invite Link for Giveaway Child", description: "Get Invite Link for Giveaway Child",
run: async (client, interaction) => { run: async (client, interaction) => {
let invite = new EmbedBuilder()
let invite = new MessageEmbed() .setTitle(`${interaction.user.tag}`)
.setAuthor(`Invite of ${client.user.username}`, `${client.user.displayAvatarURL({ format: 'png' })}`) .setDescription("You can invite the bot by clicking on the below button.")
.setColor("#2f3136") .setColor("#2f3136")
.setFooter(`© EmotionChild | Have a nice day!`); .setFooter({ text: `© EmotionChild | Have a nice day!` });
const row = new MessageActionRow() const row = new MessageActionRow().addComponents(
.addComponents(
new MessageButton() new MessageButton()
.setEmoji('865572290065072128') .setEmoji("865572290065072128")
.setLabel(`Invite ${client.user.username}`) .setLabel(`Invite ${client.user.username}`)
.setURL(`https://discord.com/api/oauth2/authorize?client_id=726333575091454002&permissions=8&scope=bot%20applications.commands`) .setURL(
.setStyle('LINK'), `https://discord.com/api/oauth2/authorize?client_id=910559370843131944&permissions=8&scope=bot%20applications.commands`
)
.setStyle("LINK")
); );
await interaction.reply({ embeds: [invite],components: [row], ephemeral: true }); await interaction.reply({
embeds: [invite],
components: [row],
ephemeral: true,
});
}, },
}; };

71
commands/pause.js Normal file
View file

@ -0,0 +1,71 @@
const Discord = require("discord.js");
module.exports = {
description: "Pause a giveaway",
options: [
{
name: "giveaway",
description: "The giveaway to pause (message ID or giveaway prize)",
type: Discord.ApplicationCommandOptionType.String,
required: true,
},
],
run: async (client, interaction) => {
// If the member doesn't have enough permissions
if (
!interaction.member.permissions.has("MANAGE_MESSAGES") &&
!interaction.member.roles.cache.some((r) => r.name === "Giveaways")
) {
return interaction.reply({
content:
":x: You need to have the manage messages permissions to pause giveaways.",
ephemeral: true,
});
}
const query = interaction.options.getString("giveaway");
// try to found the giveaway with prize then with ID
const giveaway =
// Search with giveaway prize
client.giveawaysManager.giveaways.find(
(g) => g.prize === query && g.guildId === interaction.guild.id
) ||
// Search with giveaway ID
client.giveawaysManager.giveaways.find(
(g) => g.messageId === query && g.guildId === interaction.guild.id
);
// If no giveaway was found
if (!giveaway) {
return interaction.reply({
content: "Unable to find a giveaway for `" + query + "`.",
ephemeral: true,
});
}
if (giveaway.pauseOptions.isPaused) {
return interaction.reply({
content: "This giveaway is already paused.",
ephemeral: true,
});
}
// Edit the giveaway
client.giveawaysManager
.pause(giveaway.messageId)
// Success message
.then(() => {
// Success message
interaction.reply("Giveaway paused!");
})
.catch((e) => {
interaction.reply({
content: e,
ephemeral: true,
});
});
},
};

View file

@ -1,30 +1,30 @@
const messages = require('../utils/messages'); const messages = require("../utils/messages");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "ping", name: "ping",
description: "Tells the bot's latency,", description: "Tells a bot latency,",
run: async (client, interaction) => { run: async (client, interaction) => {
// If the member doesn't have enough permissions // If the member doesn't have enough permissions
if (!interaction.member.permissions.has("SEND_MESSAGES")) { if (!interaction.member.permissions.has("SEND_MESSAGES")) {
return interaction.reply({ return interaction.reply({
content: content:
":x: You need to have the manage messages permissions to start giveaways.", ":x: You need to have the right permissions to use this command.",
ephemeral: true, ephemeral: true,
}); });
} }
let circles = { let circles = {
green: "<:online:885049752297824276>", green: "<:online:903711513183940669>",
yellow: "<:idle:885049726460899339>", yellow: "<:idle:903711513490112512> ",
red: "<:offline:885049312877346817>", red: "<:dnd:903711513066487851>",
}; };
let botping = new MessageEmbed() let botping = new EmbedBuilder()
.setTitle(`${client.user.name} Ping`) .setTitle(`${client.user.username} Ping`)
.setColor("2f3136") .setColor("2f3136")
.addFields({ .addFields({
name: "<:link:911514727375577088> Bot Ping:", name: "<:connection2:896715171454677013> Bot Ping:",
value: `${ value: `${
client.ws?.ping <= 200 client.ws?.ping <= 200
? circles.green ? circles.green

View file

@ -1,62 +1,70 @@
module.exports = { const Discord = require("discord.js");
description: 'Reroll a giveaway', module.exports = {
description: "Reroll a giveaway",
options: [ options: [
{ {
name: 'giveaway', name: "giveaway",
description: 'The giveaway to reroll (message ID or prize)', description: "The giveaway to reroll (message ID or prize)",
type: 'STRING', type: Discord.ApplicationCommandOptionType.String,
required: true required: true,
} },
], ],
run: async (client, interaction) => { run: async (client, interaction) => {
// If the member doesn't have enough permissions // If the member doesn't have enough permissions
if(!interaction.member.permissions.has('MANAGE_MESSAGES') && !interaction.member.roles.cache.some((r) => r.name === "Giveaways")){ if (
!interaction.member.permissions.has("MANAGE_MESSAGES") &&
!interaction.member.roles.cache.some((r) => r.name === "Giveaways")
) {
return interaction.reply({ return interaction.reply({
content: ':x: You need to have the manage messages permissions to reroll giveaways.', content:
ephemeral: true ":x: You need to have the manage messages permissions to reroll giveaways.",
ephemeral: true,
}); });
} }
const query = interaction.options.getString('giveaway'); const query = interaction.options.getString("giveaway");
// try to found the giveaway with prize then with ID // try to found the giveaway with prize then with ID
const giveaway = const giveaway =
// Search with giveaway prize // Search with giveaway prize
client.giveawaysManager.giveaways.find((g) => g.prize === query && g.guildId === interaction.guild.id) || client.giveawaysManager.giveaways.find(
(g) => g.prize === query && g.guildId === interaction.guild.id
) ||
// Search with giveaway ID // Search with giveaway ID
client.giveawaysManager.giveaways.find((g) => g.messageId === query && g.guildId === interaction.guild.id); client.giveawaysManager.giveaways.find(
(g) => g.messageId === query && g.guildId === interaction.guild.id
);
// If no giveaway was found // If no giveaway was found
if (!giveaway) { if (!giveaway) {
return interaction.reply({ return interaction.reply({
content: 'Unable to find a giveaway for `'+ query +'`.', content: "Unable to find a giveaway for `" + query + "`.",
ephemeral: true ephemeral: true,
}); });
} }
if (!giveaway.ended) { if (!giveaway.ended) {
return interaction.reply({ return interaction.reply({
content: 'The giveaway is not ended yet.', content: "The giveaway is not ended yet.",
ephemeral: true ephemeral: true,
}); });
} }
// Reroll the giveaway // Reroll the giveaway
client.giveawaysManager.reroll(giveaway.messageId) client.giveawaysManager
.reroll(giveaway.messageId)
.then(() => { .then(() => {
// Success message // Success message
interaction.reply('Giveaway rerolled!'); interaction.reply("Giveaway rerolled!");
}) })
.catch((e) => { .catch((e) => {
interaction.reply({ interaction.reply({
content: e, content: e,
ephemeral: true ephemeral: true,
}); });
}); });
},
}
}; };

View file

@ -1,56 +1,60 @@
const ms = require('ms'); const Discord = require("discord.js");
const ms = require("ms");
const messages = require("../utils/messages"); const messages = require("../utils/messages");
module.exports = { module.exports = {
description: "Start a giveaway",
description: 'Start a giveaway',
options: [ options: [
{ {
name: 'duration', name: "duration",
description: 'How long the giveaway should last for. Example values: 1m, 1h, 1d', description:
type: 'STRING', "How long the giveaway should last for. Example values: 1m, 1h, 1d",
required: true type: Discord.ApplicationCommandOptionType.String,
required: true,
}, },
{ {
name: 'winners', name: "winners",
description: 'How many winners the giveaway should have', description: "How many winners the giveaway should have",
type: 'INTEGER', type: Discord.ApplicationCommandOptionType.Integer,
required: true required: true,
}, },
{ {
name: 'prize', name: "prize",
description: 'What the prize of the giveaway should be', description: "What the prize of the giveaway should be",
type: 'STRING', type: Discord.ApplicationCommandOptionType.String,
required: true required: true,
}, },
{ {
name: 'channel', name: "channel",
description: 'The channel to start the giveaway in', description: "The channel to start the giveaway in",
type: 'CHANNEL', type: Discord.ApplicationCommandOptionType.Channel,
required: true required: true,
} },
], ],
run: async (client, interaction) => { run: async (client, interaction) => {
// If the member doesn't have enough permissions // If the member doesn't have enough permissions
if(!interaction.member.permissions.has('MANAGE_MESSAGES') && !interaction.member.roles.cache.some((r) => r.name === "Giveaways")){ if (
!interaction.member.permissions.has("MANAGE_MESSAGES") &&
!interaction.member.roles.cache.some((r) => r.name === "Giveaways")
) {
return interaction.reply({ return interaction.reply({
content: ':x: You need to have the manage messages permissions to start giveaways.', content:
ephemeral: true ":x: You need to have the manage messages permissions to start giveaways.",
ephemeral: true,
}); });
} }
const giveawayChannel = interaction.options.getChannel('channel'); const giveawayChannel = interaction.options.getChannel("channel");
const giveawayDuration = interaction.options.getString('duration'); const giveawayDuration = interaction.options.getString("duration");
const giveawayWinnerCount = interaction.options.getInteger('winners'); const giveawayWinnerCount = interaction.options.getInteger("winners");
const giveawayPrize = interaction.options.getString('prize'); const giveawayPrize = interaction.options.getString("prize");
if(!giveawayChannel.isText()) { if (!giveawayChannel.isTextBased()) {
return interaction.reply({ return interaction.reply({
content: ':x: Selected channel is not text-based.', content: ":x: Selected channel is not text-based.",
ephemeral: true ephemeral: true,
}); });
} }
@ -65,11 +69,9 @@ module.exports = {
// Who hosts this giveaway // Who hosts this giveaway
hostedBy: client.config.hostedBy ? interaction.user : null, hostedBy: client.config.hostedBy ? interaction.user : null,
// Messages // Messages
messages messages,
}); });
interaction.reply(`Giveaway started in ${giveawayChannel}!`); interaction.reply(`Giveaway started in ${giveawayChannel}!`);
},
}
}; };

View file

@ -1,85 +1,87 @@
const os = require('os'); const os = require("os");
const { MessageEmbed } = require('discord.js'); const { EmbedBuilder } = require("discord.js");
const feroms = require('fero-ms'); const feroms = require("fero-ms");
module.exports = { module.exports = {
name: 'stats', name: "stats",
description: 'Sends bot physical statistics', description: "Sends bot physical statistics",
run: async(client, interaction) => { run: async (client, interaction) => {
let uptime = client.uptime; let uptime = client.uptime;
let shortUptime = feroms.ms(uptime); let shortUptime = feroms.ms(uptime);
let model = os.cpus()[0].model; let model = os.cpus()[0].model;
let cores = os.cpus().length; let cores = os.cpus().length;
let platform = os.platform(); let platform = os.platform();
let nodejs = process.version; let nodejs = process.version;
let djs = require('discord.js').version; let djs = require("discord.js").version;
let botversion = require('../package.json').version; let botversion = require("../package.json").version;
let server = client.guilds.cache.size; let server = client.guilds.cache.size;
let user = client.users.cache.size; let user = client.users.cache.size;
let channel = client.channels.cache.size; let channel = client.channels.cache.size;
let statsembed = new MessageEmbed() let statsembed = new EmbedBuilder()
.addFields( .addFields(
{ {
name: '<:live2:896715171882500106> I have been online for?', name: "<:live2:896715171882500106> I have been online for?",
value: `\`\`\`${shortUptime}\`\`\`` value: `\`\`\`${shortUptime}\`\`\``,
}, },
{ {
name: '<:globe:896718155416760340> Guilds', name: "<:globe:896718155416760340> Guilds",
value: `\`${server}\``, value: `\`${server}\``,
inline: true inline: true,
}, },
{ {
name: '<:mention:896718358672707584> Users', name: "<:mention:896718358672707584> Users",
value: `\`${user}\``, value: `\`${user}\``,
inline: true inline: true,
}, },
{ {
name: '<:channel:896717996326809641> Channels', name: "<:channel:896717996326809641> Channels",
value: `\`${channel}\``, value: `\`${channel}\``,
inline: true inline: true,
}, },
{ {
name: 'Bot Version', name: "Bot Version",
value: `\`v${botversion}\``, value: `\`v${botversion}\``,
inline: true inline: true,
}, },
{ {
name: '<:prime:896718399776886816> Arch', name: "<:prime:896718399776886816> Arch",
value: `\`${os.arch()}\``, value: `\`${os.arch()}\``,
inline: true inline: true,
}, },
{ {
name: '<:info:896718244461826140> Platform', name: "<:info:896718244461826140> Platform",
value: `\`${platform}\``, value: `\`${platform}\``,
inline: true inline: true,
}, },
{ {
name: '<:desktop:896718080821047346> Cores', name: "<:desktop:896718080821047346> Cores",
value: `\`${cores}\``, value: `\`${cores}\``,
inline: true inline: true,
}, },
{ {
name: '<a:Discord:896723328277024819> Discord.js Version', name: "<a:Discord:896723328277024819> Discord.js Version",
value: `\`v${djs}\``, value: `\`v${djs}\``,
inline: true inline: true,
}, },
{ {
name: '<:jss:896718571491704852> Node.js Version', name: "<:jss:896718571491704852> Node.js Version",
value: `\`${nodejs}\``, value: `\`${nodejs}\``,
inline: true inline: true,
}, },
{ {
name: '<:ram:896715172029276180> Ram Usage', name: "<:ram:896715172029276180> Ram Usage",
value: `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB/ ${(os.totalmem() / 1024 / 1024).toFixed(2)}MB\``, value: `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(
inline: true 2
)}MB/ ${(os.totalmem() / 1024 / 1024).toFixed(2)}MB\``,
inline: true,
}, },
{ {
name: '<:desktop:896718080821047346> CPU Model', name: "<:desktop:896718080821047346> CPU Model",
value: `\`\`\`${model}\`\`\`` value: `\`\`\`${model}\`\`\``,
} }
) )
.setTimestamp() .setTimestamp();
await interaction.reply({ embeds: [statsembed] }); await interaction.reply({ embeds: [statsembed] });
} },
} };

71
commands/unpause.js Normal file
View file

@ -0,0 +1,71 @@
const Discord = require("discord.js");
module.exports = {
description: "Unpause a giveaway",
options: [
{
name: "giveaway",
description: "The giveaway to unpause (message ID or giveaway prize)",
type: Discord.ApplicationCommandOptionType.String,
required: true,
},
],
run: async (client, interaction) => {
// If the member doesn't have enough permissions
if (
!interaction.member.permissions.has("MANAGE_MESSAGES") &&
!interaction.member.roles.cache.some((r) => r.name === "Giveaways")
) {
return interaction.reply({
content:
":x: You need to have the manage messages permissions to unpause giveaways.",
ephemeral: true,
});
}
const query = interaction.options.getString("giveaway");
// try to found the giveaway with prize then with ID
const giveaway =
// Search with giveaway prize
client.giveawaysManager.giveaways.find(
(g) => g.prize === query && g.guildId === interaction.guild.id
) ||
// Search with giveaway ID
client.giveawaysManager.giveaways.find(
(g) => g.messageId === query && g.guildId === interaction.guild.id
);
// If no giveaway was found
if (!giveaway) {
return interaction.reply({
content: "Unable to find a giveaway for `" + query + "`.",
ephemeral: true,
});
}
if (!giveaway.pauseOptions.isPaused) {
return interaction.reply({
content: "This giveaway is not paused.",
ephemeral: true,
});
}
// Edit the giveaway
client.giveawaysManager
.unpause(giveaway.messageId)
// Success message
.then(() => {
// Success message
interaction.reply("Giveaway unpaused!");
})
.catch((e) => {
interaction.reply({
content: e,
ephemeral: true,
});
});
},
};