pineafan | 377794f | 2022-04-18 19:01:01 +0100 | [diff] [blame] | 1 | import Discord, { CommandInteraction } 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 | 1dc1572 | 2022-03-14 21:27:34 +0000 | [diff] [blame] | 4 | import { testLink, testMalware, testNSFW } from '../utils/scanners.js'; |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 5 | |
| 6 | const command = new SlashCommandBuilder() |
| 7 | .setName("privacy") |
pineafan | 1dc1572 | 2022-03-14 21:27:34 +0000 | [diff] [blame] | 8 | .setDescription("we changed the fucking charger again!") |
| 9 | .addStringOption(option => option.setName("link").setDescription("fuck you").setRequired(false)) |
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 | 1dc1572 | 2022-03-14 21:27:34 +0000 | [diff] [blame] | 12 | console.log(await testLink(interaction.options.getString("link"))) |
pineafan | 4f164f3 | 2022-02-26 22:07:12 +0000 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => { |
| 16 | return true; |
| 17 | } |
| 18 | |
| 19 | export { command }; |
| 20 | export { callback }; |
| 21 | export { check }; |