blob: 6d6274558ead8e87e9244cacafd2a54d6d124249 [file] [log] [blame]
pineafan73a7c4a2022-07-24 10:38:04 +01001import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
pineafan4f164f32022-02-26 22:07:12 +00002import { SlashCommandBuilder } from "@discordjs/builders";
3import { WrappedCheck } from "jshaiku";
pineafan73a7c4a2022-07-24 10:38:04 +01004import { testLink, testMalware, testNSFW } from "../reflex/scanners.js";
5import EmojiEmbed from "../utils/generateEmojiEmbed.js";
pineafan4f164f32022-02-26 22:07:12 +00006
7const command = new SlashCommandBuilder()
8 .setName("privacy")
pineafan73a7c4a2022-07-24 10:38:04 +01009 .setDescription("Information and options for you and your server's settings")
pineafan4f164f32022-02-26 22:07:12 +000010
pineafan4edb7762022-06-26 19:21:04 +010011const callback = async (interaction: CommandInteraction): Promise<any> => {
pineafan73a7c4a2022-07-24 10:38:04 +010012 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});
pineafan4f164f32022-02-26 22:07:12 +000033}
34
35const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
36 return true;
37}
38
39export { command };
40export { callback };
41export { check };