updated comments
This commit is contained in:
6
dist/api.js
vendored
6
dist/api.js
vendored
@@ -68,11 +68,10 @@ function getHTML(name) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let result = Buffer.alloc(0);
|
let result = Buffer.alloc(0);
|
||||||
response.on('data', function (chunk) {
|
response.on('data', chunk => {
|
||||||
result = Buffer.concat([result, chunk]);
|
result = Buffer.concat([result, chunk]);
|
||||||
});
|
});
|
||||||
response.on('end', function () {
|
response.on('end', () => {
|
||||||
// result has response body buffer
|
|
||||||
resolve(result.toString());
|
resolve(result.toString());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -212,4 +211,3 @@ async function getPlayerInteraction(interaction) {
|
|||||||
await interaction.editReply('```\n' + JSON.stringify(data, null, 2) + '\n```');
|
await interaction.editReply('```\n' + JSON.stringify(data, null, 2) + '\n```');
|
||||||
}
|
}
|
||||||
exports.getPlayerInteraction = getPlayerInteraction;
|
exports.getPlayerInteraction = getPlayerInteraction;
|
||||||
//await getPlayer('IanWhysp')
|
|
||||||
|
|||||||
@@ -67,12 +67,11 @@ function getHTML(name: string): Promise<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let result = Buffer.alloc(0);
|
let result = Buffer.alloc(0);
|
||||||
response.on('data', function(chunk) {
|
response.on('data', chunk => {
|
||||||
result = Buffer.concat([result, chunk]);
|
result = Buffer.concat([result, chunk]);
|
||||||
});
|
});
|
||||||
|
|
||||||
response.on('end', function() {
|
response.on('end', () => {
|
||||||
// result has response body buffer
|
|
||||||
resolve(result.toString());
|
resolve(result.toString());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -250,5 +249,3 @@ export async function getPlayerInteraction(interaction: CommandInteraction) {
|
|||||||
else
|
else
|
||||||
await interaction.editReply('```\n'+JSON.stringify(data, null, 2)+'\n```');
|
await interaction.editReply('```\n'+JSON.stringify(data, null, 2)+'\n```');
|
||||||
}
|
}
|
||||||
|
|
||||||
//await getPlayer('IanWhysp')
|
|
||||||
Reference in New Issue
Block a user