From 0742771f0aa7847cde6b1a0c1f776e3d478fd696 Mon Sep 17 00:00:00 2001 From: Sarimoko Date: Fri, 25 Feb 2022 03:00:44 -0800 Subject: [PATCH] init --- server/mmoirc.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/server/mmoirc.js b/server/mmoirc.js index 3984cb7..b31af93 100644 --- a/server/mmoirc.js +++ b/server/mmoirc.js @@ -1,11 +1,25 @@ -// GAME NGIN | MMOIRC -// ================================ -// Inside Twitch Chat an adventure is growing! -// -------------------------------- -// View README.md for .env setup!!! -// -------------------------------- require('dotenv').config(); +var colors = require('colors'); +var mysql = require('mysql'); +// Twitch API const tmi = require('tmi.js'); +// Discord API +const { Client, Intents } = require('discord.js'); +const client = new Client({ intents: [Intents.FLAGS.GUILDS] }); +client.on('ready', () => { + console.log(`Logged in as ${client.user.tag}!`); + }); + + client.on('interactionCreate', async interaction => { + if (!interaction.isCommand()) return; + + if (interaction.commandName === 'ping') { + await interaction.reply('Pong!'); + } + }); + + client.login('token'); + // TMI Config // -------------------------------- console.log(process.env.API_HOST);