Fixed CPU leak

merge-requests/1/merge
Bsian 2019-10-29 19:43:53 +00:00
parent 08bd4645f6
commit bac8ed4c7c
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ export default class Util {
let str: string = '';
let pos: number;
while (string.length > 0) {
pos = string.length > length ? string.lastIndexOf('\n', length) : outputFile.length;
pos = string.length > length ? string.lastIndexOf('\n', length) : string.length;
if (pos > length) pos = length;
str = string.substr(0, pos);
string = string.substr(pos);

View File

@ -32,7 +32,7 @@ export default class Modlogs extends Command {
case 3: name = 'Unlock'; break;
case 4: name = 'Delete'; break;
}
const value = `**Account name:** ${username}\n**Moderator:** <@${moderatorID}>\n**Reason:** ${reason}\n**Date:** ${date.toLocaleString('en-us')} EST`;
const value = `**Account name:** ${username}\n**Moderator:** <@${moderatorID}>\n**Reason:** ${reason || 'Not supplied'}\n**Date:** ${date.toLocaleString('en-us')} EST`;
const inline = true;
return { name, value, inline };
});