diff options
author | Minteck <contact@minteck.org> | 2022-02-14 13:53:25 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-02-14 13:53:25 +0100 |
commit | 03053a8c0762657621abd7c03b5edf77073912d5 (patch) | |
tree | 2d961b57dca64969125a8573f938f9ebfd876bb6 /commands/info.js | |
parent | f183c285c065bed9cd19228c832f417371c374e0 (diff) | |
download | ponyfind-03053a8c0762657621abd7c03b5edf77073912d5.tar.gz ponyfind-03053a8c0762657621abd7c03b5edf77073912d5.tar.bz2 ponyfind-03053a8c0762657621abd7c03b5edf77073912d5.zip |
Add buttons to /info
Diffstat (limited to 'commands/info.js')
-rw-r--r-- | commands/info.js | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/commands/info.js b/commands/info.js index aaa4dc5..b9f4a34 100644 --- a/commands/info.js +++ b/commands/info.js @@ -1,5 +1,30 @@ +/* + * MIT License + * + * Copyright (c) 2022- Minteck + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + const fs = require('fs'); -const { MessageActionRow, MessageButton, MessageSelectMenu, MessageEmbed } = require('discord.js'); +const {MessageActionRow, MessageButton, MessageSelectMenu, MessageEmbed} = require('discord.js'); const admin = fs.readFileSync("./config/admin.txt").toString().trim(); const list = Object.keys(JSON.parse(fs.readFileSync("./data/data.json").toString())); @@ -108,7 +133,28 @@ module.exports = async (interaction) => { .setTitle(l("Bot stats", "Statistiques du robot", interaction.user.id, interaction.guild ? interaction.guild.id : 0)) .setDescription(l("Ponyfind is a Discord bot that helps you get easy and fast access to data relative to My Little Pony (generations 4 and 5).", "Ponyfind est un robot Discord qui vous aide à obtenir un accès simple et rapide à des données relatives à My Little Pony (générations 4 et 5).", interaction.user.id, interaction.guild ? interaction.guild.id : 0)) .addFields(fields) - .setFooter({ text: l("made with ♥ by Minteck, a My Little Pony fan", "fait avec ♥ par Minteck, une fan de My Little Pony", interaction.user.id, interaction.guild ? interaction.guild.id : 0) }) + .setFooter({text: l("made with ♥ by Minteck, a My Little Pony fan", "fait avec ♥ par Minteck, une fan de My Little Pony", interaction.user.id, interaction.guild ? interaction.guild.id : 0)}) + ], + components: [ + new MessageActionRow() + .addComponents( + new MessageButton() + .setStyle("LINK") + .setURL("https://gitlab.minteck.org/minteck/ponyfind") + .setLabel(l("Source Code", "Code source", interaction.user.id, interaction.guild ? interaction.guild.id : 0)) + ) + .addComponents( + new MessageButton() + .setStyle("LINK") + .setURL("https://minteck.org/legal/#/privacy") + .setLabel(l("Data Privacy", "Politique de confidentialité", interaction.user.id, interaction.guild ? interaction.guild.id : 0)) + ) + .addComponents( + new MessageButton() + .setStyle("LINK") + .setURL("https://minteck.org/legal/#/terms") + .setLabel(l("Terms and Conditions", "Conditions d'utilisation", interaction.user.id, interaction.guild ? interaction.guild.id : 0)) + ) ] }); } |