diff --git a/data/strings.json b/data/strings.json index 6f3f0e9..a345d5f 100644 --- a/data/strings.json +++ b/data/strings.json @@ -13,9 +13,5 @@ "previous": "⏮️", "confirm": "☑️", "cancel": "❌" - }, - "urls": { - "avatar": "" - }, - "temp": {} + } } \ No newline at end of file diff --git a/main.js b/main.js index dc55716..bbdaae2 100644 --- a/main.js +++ b/main.js @@ -3,8 +3,7 @@ // dotenv for handling environment variables const dotenv = require('dotenv'); dotenv.config(); -const token = process.env.TOKEN; -const statusChannelId = process.env.statusChannelId; +const token = process.env.TOKEN;; // Discord.JS const { Client, GatewayIntentBits, Partials } = require('discord.js'); @@ -24,7 +23,8 @@ const client = new Client({ // Various imports const fn = require('./modules/functions.js'); const strings = require('./data/strings.json'); -const isDev = process.env.isDev; +const isDev = process.env.DEBUG; +const statusChannelId = process.env.STATUSCHANNELID client.once('ready', () => { fn.collections.slashCommands(client); @@ -46,10 +46,6 @@ client.on('interactionCreate', async interaction => { console.error('Slash command attempted to run but not found: /' + commandName); } } - - if (interaction.isButton() && interaction.component.customId == 'refresh') { - fn.refresh(interaction); - } }); client.login(token); \ No newline at end of file diff --git a/modules/functions.js b/modules/functions.js index f3edb7f..4951a0f 100644 --- a/modules/functions.js +++ b/modules/functions.js @@ -2,7 +2,7 @@ // dotenv for handling environment variables const dotenv = require('dotenv'); dotenv.config(); -const isDev = process.env.isDev; +const isDev = process.env.DEBUG; // filesystem const fs = require('fs'); @@ -13,7 +13,6 @@ const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = Discord; // Various imports from other files const config = require('../data/config.json'); -let guildInfo = require('../data/guildInfo.json'); const strings = require('../data/strings.json'); const slashCommandFiles = fs.readdirSync('./slash-commands/').filter(file => file.endsWith('.js')); @@ -75,18 +74,6 @@ const functions = { const messageContents = { embeds: [embed], ephemeral: true }; return messageContents; } - }, - refresh(interaction) { - functions.rankings.parse(interaction).then(r1 => { - functions.tree.parse(interaction).then(r2 => { - const embed = functions.builders.comparisonEmbed(functions.rankings.compare(interaction), functions.builders.refreshAction()) - interaction.update(embed); - }).catch(e => { - interaction.reply(functions.builders.errorEmbed(e)); - }); - }).catch(e => { - interaction.reply(functions.builders.errorEmbed(e)); - }); } };