queue command init
This commit is contained in:
6
dist/index.js
vendored
6
dist/index.js
vendored
@@ -31,6 +31,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
const discord_js_1 = require("discord.js");
|
const discord_js_1 = require("discord.js");
|
||||||
const fs = __importStar(require("fs"));
|
const fs = __importStar(require("fs"));
|
||||||
const discord_1 = require("./discord");
|
const discord_1 = require("./discord");
|
||||||
|
const queue_1 = require("./queue");
|
||||||
const CLIENT = new discord_js_1.Client({ intents: [discord_js_1.Intents.FLAGS.GUILDS] });
|
const CLIENT = new discord_js_1.Client({ intents: [discord_js_1.Intents.FLAGS.GUILDS] });
|
||||||
if (!fs.existsSync('./token')) {
|
if (!fs.existsSync('./token')) {
|
||||||
fs.writeFileSync('./token', '');
|
fs.writeFileSync('./token', '');
|
||||||
@@ -45,8 +46,7 @@ CLIENT.on('ready', client => {
|
|||||||
CLIENT.on('interactionCreate', (interaction) => __awaiter(void 0, void 0, void 0, function* () {
|
CLIENT.on('interactionCreate', (interaction) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (!interaction.isCommand())
|
if (!interaction.isCommand())
|
||||||
return;
|
return;
|
||||||
if (interaction.commandName === 'queue') {
|
if (interaction.commandName === 'queue')
|
||||||
yield interaction.reply('Pong!');
|
(0, queue_1.createQueue)(interaction);
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
CLIENT.login(TOKEN);
|
CLIENT.login(TOKEN);
|
||||||
|
|||||||
2
dist/queue.js
vendored
2
dist/queue.js
vendored
@@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.createQueue = void 0;
|
exports.createQueue = void 0;
|
||||||
function createQueue() {
|
function createQueue(interaction) {
|
||||||
}
|
}
|
||||||
exports.createQueue = createQueue;
|
exports.createQueue = createQueue;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { Client, Intents } from 'discord.js';
|
import { Client, Intents } from 'discord.js';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import { registerCommands } from './discord';
|
import { registerCommands } from './discord';
|
||||||
|
import { createQueue } from './queue';
|
||||||
const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] });
|
const CLIENT = new Client({ intents: [Intents.FLAGS.GUILDS] });
|
||||||
|
|
||||||
if (!fs.existsSync('./token')) {
|
if (!fs.existsSync('./token')) {
|
||||||
@@ -20,9 +21,8 @@ CLIENT.on('ready', client => {
|
|||||||
CLIENT.on('interactionCreate', async interaction => {
|
CLIENT.on('interactionCreate', async interaction => {
|
||||||
if (!interaction.isCommand()) return;
|
if (!interaction.isCommand()) return;
|
||||||
|
|
||||||
if (interaction.commandName === 'queue') {
|
if (interaction.commandName === 'queue')
|
||||||
await interaction.reply('Pong!');
|
createQueue(interaction);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
CLIENT.login(TOKEN);
|
CLIENT.login(TOKEN);
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
export function createQueue() {
|
import { CommandInteraction } from "discord.js";
|
||||||
|
|
||||||
|
export function createQueue(interaction: CommandInteraction) {
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user