pineafan | 73a7c4a | 2022-07-24 10:38:04 +0100 | [diff] [blame^] | 1 | import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js"; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 2 | import { SlashCommandBuilder } from "@discordjs/builders"; |
| 3 | import { WrappedCheck } from "jshaiku"; |
pineafan | 73a7c4a | 2022-07-24 10:38:04 +0100 | [diff] [blame^] | 4 | import { testLink, testMalware, testNSFW } from "../reflex/scanners.js"; |
| 5 | import EmojiEmbed from "../utils/generateEmojiEmbed.js"; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 6 | |
| 7 | const command = new SlashCommandBuilder() |
| 8 | .setName("privacy") |
pineafan | 73a7c4a | 2022-07-24 10:38:04 +0100 | [diff] [blame^] | 9 | .setDescription("Information and options for you and your server's settings") |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 10 | |
pineafan | 4edb776 | 2022-06-26 19:21:04 +0100 | [diff] [blame] | 11 | const callback = async (interaction: CommandInteraction): Promise<any> => { |
pineafan | 73a7c4a | 2022-07-24 10:38:04 +0100 | [diff] [blame^] | 12 | let components = []; |
| 13 | if (interaction.inCachedGuild() && interaction.member.permissions.has("MANAGE_GUILD")) { |
| 14 | components.push(new MessageActionRow().addComponents([new MessageButton() |
| 15 | .setLabel("Clear all data") |
| 16 | .setEmoji("CONTROL.CROSS") |
| 17 | .setCustomId("clear") |
| 18 | .setStyle("DANGER") |
| 19 | ])); |
| 20 | } |
| 21 | await interaction.reply({embeds: [new EmojiEmbed() |
| 22 | .setTitle("Privacy") |
| 23 | .setDescription( |
| 24 | "**Link Scanning Types**\n" + |
| 25 | "> Facebook - Facebook trackers include data such as your date of birth, and guess your age if not entered, your preferences, who you interact with and more.\n" + |
| 26 | "> AMP - AMP is a technology that allows websites to be served by Google. This means Google can store and track data, and are pushing this to as many pages as possible.\n\n" + |
| 27 | "**Transcripts**\n" + |
| 28 | "> Transcripts allow you to store all messages sent in a channel. This could be an issue in some cases, as they are hosted on [Pastebin](https://pastebin.com), so a leaked link could show all messages sent in the channel.\n" |
| 29 | ) |
| 30 | .setStatus("Success") |
| 31 | .setEmoji("NUCLEUS.COMMANDS.LOCK") |
| 32 | ], components: components}); |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => { |
| 36 | return true; |
| 37 | } |
| 38 | |
| 39 | export { command }; |
| 40 | export { callback }; |
| 41 | export { check }; |