diff options
author | Minteck <contact@minteck.org> | 2022-02-11 18:46:01 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-02-11 18:46:01 +0100 |
commit | 395c72df876e2674b562ff95f8f867b6f6d3cba8 (patch) | |
tree | 7923cfc4c15e86f2e59058369b763a5b21c2433f /commands/pony.js | |
parent | a7102acd6fda9168b057d90c961618aead034336 (diff) | |
download | ponyfind-395c72df876e2674b562ff95f8f867b6f6d3cba8.tar.gz ponyfind-395c72df876e2674b562ff95f8f867b6f6d3cba8.tar.bz2 ponyfind-395c72df876e2674b562ff95f8f867b6f6d3cba8.zip |
Feature: implements #6
Diffstat (limited to 'commands/pony.js')
-rw-r--r-- | commands/pony.js | 6 |
1 files changed, 2 insertions, 4 deletions
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") |