diff --git a/bot/commands/Utility/splatnet.js b/bot/commands/Utility/splatnet.js index ec818c0..d97fa9e 100644 --- a/bot/commands/Utility/splatnet.js +++ b/bot/commands/Utility/splatnet.js @@ -185,52 +185,6 @@ module.exports = class Splatnet extends Command { } } - if (subCmd === 'salmonrun') { - if (client.cache.has('SPLATNET_SR') && Date.now() > client.cache.get('SPLATNET_SR').expiry) { - client.cache.delete('SPLATNET_SR'); - } - - if (!client.cache.has('SPLATNET_SR')) { - fetch('https://splatoon3.ink/data/schedules.json', { headers: { 'User-Agent': client.config.userAgent} }) - .then(res => res.json()) - .then(tlJson => { - fetch('https://splatoon3.ink/data/coop.json', { headers: { 'User-Agent': client.config.userAgent} }) - .then(rewardRes => rewardRes.json()) - .then(async rewardJson => { - const embeds = []; - const json = { - tl: tlJson.data.coopGroupingSchedule, - rw: rewardJson.data.coopResult.monthlyGear - }; - - embeds.push(new client.EmbedBuilder() - .setTitle('Current Salmon Run') - .setColor(interaction.guild.members.me.displayColor) - .setThumbnail(json.rw.image.url) - .setImage(json.tl.regularSchedules.nodes[0].setting.coopStage.image.url) - .addFields( - { - name: 'Stage', - value: json.tl.regularSchedules.nodes[0].setting.coopStage.name, - inline: true - }, - { - name: 'Monthly Gear', - value: json.rw.name, - inline: true - }, - { - name: 'Weapons', - value: json.tl.regularSchedules.nodes[0].setting.weapons[0] - } - - ) - ); - }); - }); - } - } - if (subCmd === 'gear') { if (client.cache.has('SPLATNET_GEAR') && Date.now() > client.cache.get('SPLATNET_GEAR').expiry) { client.cache.delete('SPLATNET_GEAR'); diff --git a/bot/deploy.js b/bot/deploy.js index 027642a..920de24 100644 --- a/bot/deploy.js +++ b/bot/deploy.js @@ -2,17 +2,11 @@ const { REST, Routes } = require('discord.js'); const { clientId, token } = require('../botconfig.json'); +const guildId = '413591792185769984'; const read = require('fs-readdir-recursive'); const commands = []; const commandFiles = read('./commands').filter(file => file.endsWith('.js')); -if (process.argv.length === 2) { - console.log('No guild ID provided, deployment failed.'); - process.exit(1); -} - -const guildId = process.argv[2]; - for (const file of commandFiles) { const command = new (require(__dirname + '/commands/' + file))(file.substr(file.indexOf('/') + 1).slice(0, -3), file.substr(0, file.indexOf('/'))); commands.push({