From c2c59e53ca3901cea0ddfc80b074e799f9e22067 Mon Sep 17 00:00:00 2001 From: ashley zomo Date: Mon, 31 Jan 2022 17:06:40 -0600 Subject: [PATCH] updated comments --- dist/api.js | 6 ++---- src/api.ts | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/dist/api.js b/dist/api.js index c38f8ae..9024359 100644 --- a/dist/api.js +++ b/dist/api.js @@ -68,11 +68,10 @@ function getHTML(name) { return; } let result = Buffer.alloc(0); - response.on('data', function (chunk) { + response.on('data', chunk => { result = Buffer.concat([result, chunk]); }); - response.on('end', function () { - // result has response body buffer + response.on('end', () => { resolve(result.toString()); }); }; @@ -212,4 +211,3 @@ async function getPlayerInteraction(interaction) { await interaction.editReply('```\n' + JSON.stringify(data, null, 2) + '\n```'); } exports.getPlayerInteraction = getPlayerInteraction; -//await getPlayer('IanWhysp') diff --git a/src/api.ts b/src/api.ts index 56c16c3..db16548 100644 --- a/src/api.ts +++ b/src/api.ts @@ -67,12 +67,11 @@ function getHTML(name: string): Promise { } let result = Buffer.alloc(0); - response.on('data', function(chunk) { + response.on('data', chunk => { result = Buffer.concat([result, chunk]); }); - response.on('end', function() { - // result has response body buffer + response.on('end', () => { resolve(result.toString()); }); }; @@ -250,5 +249,3 @@ export async function getPlayerInteraction(interaction: CommandInteraction) { else await interaction.editReply('```\n'+JSON.stringify(data, null, 2)+'\n```'); } - -//await getPlayer('IanWhysp') \ No newline at end of file