Updated
This commit is contained in:
1 parent
f6d4383ff6
commit
870435061d
5 files changed
+657
-15
No files matched your search
@@ -10,17 +10,13 @@ const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'
|
||||
|
||||
const reacted = [];
|
||||
|
||||
module.exports = async (bot, message) => {
|
||||
module.exports = async (bot, message, reaction, user) => {
|
||||
|
||||
// Ticket Creation Panel
|
||||
// This is an embed message where users are able to react and a ticket is created in return.
|
||||
|
||||
bot.on('messageReactionAdd', async (reaction, user) => {
|
||||
|
||||
|
||||
if (supportbot.ReactionTickets === "true") {
|
||||
|
||||
|
||||
const reaction = collected.first();
|
||||
|
||||
if (reaction.message.id === tickets.ReactionMessage_ID) {
|
||||
|
||||
@@ -32,11 +28,15 @@ module.exports = async (bot, message) => {
|
||||
reaction.users.remove(r.id)
|
||||
});
|
||||
|
||||
|
||||
const cmd = bot.commands.get(supportbot.NewTicket);
|
||||
if(!cmd) return;
|
||||
console.log("1")
|
||||
cmd.execute(bot, message, args);
|
||||
const ticketCMD = supportbot.NewTicket;
|
||||
try {
|
||||
const cmd = bot.commands.get("ticket");
|
||||
if(!cmd) return;
|
||||
console.log("1")
|
||||
cmd.execute(bot, message);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,4 @@ module.exports = async (bot, message) => {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
};
|
||||
Reference in new issue
Block a user