From c2a80fc56ce263598eee2015e2115bde4bf9a9e0 Mon Sep 17 00:00:00 2001 From: ashley zomo Date: Thu, 27 Jan 2022 17:06:41 -0600 Subject: [PATCH] queue command init --- dist/index.js | 6 +++--- dist/queue.js | 2 +- src/index.ts | 6 +++--- src/queue.ts | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2c648b0..8544d44 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31,6 +31,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const discord_js_1 = require("discord.js"); const fs = __importStar(require("fs")); const discord_1 = require("./discord"); +const queue_1 = require("./queue"); const CLIENT = new discord_js_1.Client({ intents: [discord_js_1.Intents.FLAGS.GUILDS] }); if (!fs.existsSync('./token')) { fs.writeFileSync('./token', ''); @@ -45,8 +46,7 @@ CLIENT.on('ready', client => { CLIENT.on('interactionCreate', (interaction) => __awaiter(void 0, void 0, void 0, function* () { if (!interaction.isCommand()) return; - if (interaction.commandName === 'queue') { - yield interaction.reply('Pong!'); - } + if (interaction.commandName === 'queue') + (0, queue_1.createQueue)(interaction); })); CLIENT.login(TOKEN); diff --git a/dist/queue.js b/dist/queue.js index 0429988..8b56744 100644 --- a/dist/queue.js +++ b/dist/queue.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createQueue = void 0; -function createQueue() { +function createQueue(interaction) { } exports.createQueue = createQueue; diff --git a/src/index.ts b/src/index.ts index 10e14db..6ab3e51 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ import { Client, Intents } from 'discord.js'; import * as fs from 'fs'; import { registerCommands } from './discord'; +import { createQueue } from './queue'; const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] }); if (!fs.existsSync('./token')) { @@ -20,9 +21,8 @@ CLIENT.on('ready', client => { CLIENT.on('interactionCreate', async interaction => { if (!interaction.isCommand()) return; - if (interaction.commandName === 'queue') { - await interaction.reply('Pong!'); - } + if (interaction.commandName === 'queue') + createQueue(interaction); }); CLIENT.login(TOKEN); \ No newline at end of file diff --git a/src/queue.ts b/src/queue.ts index f0d0c43..d4fc8bf 100644 --- a/src/queue.ts +++ b/src/queue.ts @@ -1,3 +1,5 @@ -export function createQueue() { +import { CommandInteraction } from "discord.js"; + +export function createQueue(interaction: CommandInteraction) { } \ No newline at end of file