queue command init

This commit is contained in:
2022-01-27 17:06:41 -06:00
parent a70be5599a
commit c2a80fc56c
4 changed files with 10 additions and 8 deletions

6
dist/index.js vendored
View File

@@ -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);