From 395c72df876e2674b562ff95f8f867b6f6d3cba8 Mon Sep 17 00:00:00 2001 From: Minteck Date: Fri, 11 Feb 2022 18:46:01 +0100 Subject: Feature: implements #6 --- commands/pony.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'commands/pony.js') diff --git a/commands/pony.js b/commands/pony.js index 4654b12..ef29fb9 100644 --- a/commands/pony.js +++ b/commands/pony.js @@ -7,6 +7,7 @@ const list = Object.keys(JSON.parse(fs.readFileSync("./data/data.json").toString const getResult = require('../modules/result'); const getEmbed = require('../modules/embed'); const getPixel = require("../modules/pixel"); +const getPublic = require('../modules/public'); const official = fs.readFileSync("./config/official.txt").toString().replace(/\r\n/g, "\n").split("\n"); const fpserver = fs.readFileSync("./config/fpserver.txt").toString().trim(); @@ -35,10 +36,7 @@ module.exports = async (interaction) => { if (interaction.guild) { row = new MessageActionRow() .addComponents( - new MessageButton() - .setCustomId("pony.public|" + keys[1]) - .setLabel(l("Show to everypony", "Afficher à tous", interaction.user.id, interaction.guild ? interaction.guild.id : 0)) - .setStyle("PRIMARY"), + getPublic(interaction, keys), new MessageButton() .setLabel(l("Read More", "Lire plus", interaction.user.id, interaction.guild ? interaction.guild.id : 0)) .setStyle("LINK") -- cgit