From 0b92214d2d89d3dc08b068fb8632105f323f162c Mon Sep 17 00:00:00 2001 From: Taken Date: Tue, 20 Aug 2024 21:48:15 +0200 Subject: [PATCH] Cleanup --- .gitignore | 4 +- dev-compose.yml | 14 ------ src/commands/poll.ts | 110 ------------------------------------------- 3 files changed, 1 insertion(+), 127 deletions(-) delete mode 100644 dev-compose.yml delete mode 100644 src/commands/poll.ts diff --git a/.gitignore b/.gitignore index 771307a..0f59df2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,4 @@ node_modules/* .env dist/ data/ -dev/ -.pnp.cjs -.pnp.loader.mjs +dev/ \ No newline at end of file diff --git a/dev-compose.yml b/dev-compose.yml deleted file mode 100644 index 3e7413f..0000000 --- a/dev-compose.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: '3.7' -services: - db: - container_name: postgres - image: postgres - restart: unless-stopped - ports: - - 5432:5432 - volumes: - - ./data:/var/lib/postgresql/data - environment: - - POSTGRES_PASSWORD=dev - - POSTGRES_USER=dev - - POSTGRES_DB=illegitimate diff --git a/src/commands/poll.ts b/src/commands/poll.ts deleted file mode 100644 index a8c11bf..0000000 --- a/src/commands/poll.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js" -import { ICommand } from "interfaces" -import { embedColor } from "config/options" - -export = { - name: "poll", - description: "Polls management", - dev: true, - public: true, - subcommands: true, - - data: new SlashCommandBuilder() - .setName("poll") - .setDescription("Polls creation") - .addStringOption(option => - option - .setName("question") - .setDescription("The question of the poll") - .setRequired(true) - ) - .addStringOption(option => - option - .setName("choice1") - .setDescription("The options of the poll") - .setRequired(true) - ) - .addStringOption(option => - option - .setName("choice2") - .setDescription("The options of the poll") - .setRequired(true) - ) - .addStringOption(option => - option - .setName("choice3") - .setDescription("The options of the poll") - ) - .addStringOption(option => - option - .setName("choice4") - .setDescription("The options of the poll") - ) - .addStringOption(option => - option - .setName("choice5") - .setDescription("The options of the poll") - ) - .addStringOption(option => - option - .setName("choice6") - .setDescription("The options of the poll") - ) - .addStringOption(option => - option - .setName("choice7") - .setDescription("The options of the poll") - ) - .addStringOption(option => - option - .setName("choice8") - .setDescription("The options of the poll") - ) - .addStringOption(option => - option - .setName("choice9") - .setDescription("The options of the poll") - ) - .addStringOption(option => - option - .setName("choice10") - .setDescription("The options of the poll") - ) - .addNumberOption(option => - option - .setName("duration") - .setDescription("The duration of the poll") - ) - .setDefaultMemberPermissions(PermissionFlagsBits.SendPolls) - .setDMPermission(false), - - async execute({ interaction }) { - const question = interaction.options.getString("question")! - const duration = interaction.options.getNumber("duration") || 1 - - const choices: { text: string }[] = [] - for (let i = 1; i <= 10; i++) { - const choice = interaction.options.getString(`choice${i}`) - if (choice) choices.push({ text: choice }) - } - - const channel = interaction.channel as TextChannel - - await channel.send({ - poll: { - question: { text: question }, - answers: choices, - duration: duration, - allowMultiselect: false - } - }) - - await interaction.reply({ - embeds: [{ - description: "Poll susccessfully created", - color: embedColor - }], - ephemeral: true - }) - } -} as ICommand