merge-requests/4/head
Bsian 2020-01-04 12:49:47 +00:00
parent 0b443e8297
commit a77f417e88
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
2 changed files with 4 additions and 5 deletions

View File

@ -31,7 +31,7 @@ export default class Eval extends Command {
} }
if (args[0] === '-a' || args[0] === '-async') { if (args[0] === '-a' || args[0] === '-async') {
args.shift(); args.shift();
evalString = `(async () => { ${args.join(' ').trim()} })()`; evalString = `const top = this; (async () => { ${args.join(' ').trim()} })()`;
} }
try { try {

View File

@ -25,13 +25,12 @@ export default class Parseall extends Command {
embed.setFooter(`Requested by ${message.member.username}#${message.member.discriminator}`, message.member.avatarURL); embed.setFooter(`Requested by ${message.member.username}#${message.member.discriminator}`, message.member.avatarURL);
embed.setTimestamp(); embed.setTimestamp();
const search = await this.client.db.Account.find(); const search = await this.client.db.Account.find();
const accounts = search;
const final: string[] = []; const final: string[] = [];
accounts.forEach(async (a) => { for (const a of search) {
try { try {
const certFile = readdirSync(`${a.homepath}/Validation`)[0]; const certFile = readdirSync(`${a.homepath}/Validation`)[0];
const { notAfter } = await parseCertificate(this.client, `${a.homepath}/Validation/${certFile}`); const { notAfter } = await parseCertificate(this.client, `${a.homepath}/Validation/${certFile}`); // eslint-disable-line
// @ts-ignore // @ts-ignore
const timeObject: {years: number, months: number, days: number, hours: number, minutes: number, seconds: number, firstDateWasLater: boolean} = moment.preciseDiff(new Date(), notAfter, true); const timeObject: {years: number, months: number, days: number, hours: number, minutes: number, seconds: number, firstDateWasLater: boolean} = moment.preciseDiff(new Date(), notAfter, true);
const precise: [number, string][] = []; const precise: [number, string][] = [];
@ -51,7 +50,7 @@ export default class Parseall extends Command {
if (error.message.includes('panic: Certificate PEM Encode == nil')) final.push(`${this.client.stores.emojis.error} ** ${a.username}** Invalid certificate`); if (error.message.includes('panic: Certificate PEM Encode == nil')) final.push(`${this.client.stores.emojis.error} ** ${a.username}** Invalid certificate`);
else throw error; else throw error;
} }
}); }
if (final.join('\n').length < 2048) embed.setDescription(final.join('\n')); if (final.join('\n').length < 2048) embed.setDescription(final.join('\n'));
else { else {