diff --git a/src/class/Util.ts b/src/class/Util.ts index a59d1a8..b02284a 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -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); diff --git a/src/commands/modlogs.ts b/src/commands/modlogs.ts index 925b61b..f326669 100644 --- a/src/commands/modlogs.ts +++ b/src/commands/modlogs.ts @@ -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 }; });