Fix?
parent
0b443e8297
commit
a77f417e88
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue