22 lines
656 B
JavaScript
22 lines
656 B
JavaScript
|
const { Client, Message, MessageEmbed } = require("discord.js");
|
||
|
module.exports = {
|
||
|
name: "reroll",
|
||
|
aliases: ["greroll"],
|
||
|
usage: "(Message ID)",
|
||
|
description: "Reroll a giveaway",
|
||
|
UserPerm: "MANAGE_MESSAGES",
|
||
|
/**
|
||
|
* @param {Client} client
|
||
|
* @param {Message} message
|
||
|
* @param {String[]} args
|
||
|
*/
|
||
|
run: async (client, message, args) => {
|
||
|
if (!args[0]) return client.err(message, "Giveaway", "reroll", 27);
|
||
|
const giveaway = client.giveaways.giveaways.find(
|
||
|
g => g.messageID === args[0]
|
||
|
);
|
||
|
if (!giveaway) return client.err(message, "Giveaway", "reroll", 26);
|
||
|
client.giveaways.reroll(giveaway.messageID);
|
||
|
},
|
||
|
};
|