From 282cd6444e91b6171137d5e09eb5c2ac174ff5ff Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Fri, 5 Apr 2019 07:38:06 -0700 Subject: [PATCH] Unused args --- experiments/discord-bot/commands/archive.js | 2 +- experiments/discord-bot/commands/stats.js | 2 +- experiments/discord-bot/index.js | 2 +- experiments/discord-bot/s3.js | 2 +- experiments/skinArchiveTools/lib/color.js | 2 +- experiments/skinArchiveTools/lib/readme.js | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/experiments/discord-bot/commands/archive.js b/experiments/discord-bot/commands/archive.js index 4438ff59..4e5b8492 100644 --- a/experiments/discord-bot/commands/archive.js +++ b/experiments/discord-bot/commands/archive.js @@ -6,7 +6,7 @@ const md5Buffer = require("md5"); const { getInfo } = require("../info"); const Skin = require("./skin"); -async function handler(message, args) { +async function handler(message) { const { attachments } = message; if (attachments.length < 1) { await message.channel.send("Could not archive. No attachment found."); diff --git a/experiments/discord-bot/commands/stats.js b/experiments/discord-bot/commands/stats.js index 13f6870b..326125ee 100644 --- a/experiments/discord-bot/commands/stats.js +++ b/experiments/discord-bot/commands/stats.js @@ -1,7 +1,7 @@ const { getCache } = require("../info"); const { getStats } = require("../s3"); -async function handler(message, args) { +async function handler(message) { const info = getCache(); let classic = 0; const { tweeted, approved, rejected } = await getStats(); diff --git a/experiments/discord-bot/index.js b/experiments/discord-bot/index.js index 3c5afded..5462f7f5 100644 --- a/experiments/discord-bot/index.js +++ b/experiments/discord-bot/index.js @@ -22,7 +22,7 @@ for (const command of commands) { handlers[command.command] = command.handler; } -async function handleHelp(message, args) { +async function handleHelp(message) { const commandHelp = commands .map(command => { return `\`!${command.command} ${command.usage || ""}\` -- ${ diff --git a/experiments/discord-bot/s3.js b/experiments/discord-bot/s3.js index a5402a20..b4d9f54c 100644 --- a/experiments/discord-bot/s3.js +++ b/experiments/discord-bot/s3.js @@ -20,7 +20,7 @@ function getFile(key) { function putFile(key, body) { return new Promise((resolve, reject) => { const bucketName = "winamp2-js-skins"; - s3.putObject({ Bucket: bucketName, Key: key, Body: body }, (err, data) => { + s3.putObject({ Bucket: bucketName, Key: key, Body: body }, err => { if (err) { reject(err); return; diff --git a/experiments/skinArchiveTools/lib/color.js b/experiments/skinArchiveTools/lib/color.js index f0ac2cf2..c6e5a13b 100644 --- a/experiments/skinArchiveTools/lib/color.js +++ b/experiments/skinArchiveTools/lib/color.js @@ -5,7 +5,7 @@ const getColor = imgPath => { return new Promise((resolve, reject) => { const excapedImgPath = shellescape([imgPath]); const command = `convert ${excapedImgPath} -scale 1x1\! -format '%[pixel:u]' info:-`; - exec(command, (error, stdout, stderr) => { + exec(command, (error, stdout) => { if (error !== null) { reject(error); return; diff --git a/experiments/skinArchiveTools/lib/readme.js b/experiments/skinArchiveTools/lib/readme.js index b83c16c4..f694756d 100644 --- a/experiments/skinArchiveTools/lib/readme.js +++ b/experiments/skinArchiveTools/lib/readme.js @@ -28,8 +28,8 @@ async function extractTextData(skinPath) { // TODO: Escape path const cmd = `unzip ${listFlag} -C "${skinPath}" "file_id.diz" "*.txt" ${ignoreArgs}`; - const raw = await new Promise((resolve, reject) => { - exec(cmd, (error, stdout, stderr) => { + const raw = await new Promise(resolve => { + exec(cmd, (error, stdout) => { if (error != null) { // reject(error); // return;