re-enable site command
parent
fe7099232c
commit
5d6f058d5a
|
@ -62,7 +62,7 @@ export default class SiteInfo extends Command {
|
|||
this.aliases = ['ssl', 'cert', 'certinfo', 'ci', 'tls', 'si', 'siteinfo'];
|
||||
this.permissions = 0;
|
||||
this.guildOnly = true;
|
||||
this.enabled = false;
|
||||
this.enabled = true;
|
||||
}
|
||||
|
||||
public async run(message: Message, args: string[]) {
|
||||
|
@ -145,7 +145,7 @@ export default class SiteInfo extends Command {
|
|||
loading.delete().catch(() => {});
|
||||
return this.error(message.channel, 'Unable to receive information.');
|
||||
}
|
||||
let screenshotData: string;
|
||||
let screenshotData: string | Buffer;
|
||||
try {
|
||||
const browser = await puppeteer.launch({
|
||||
ignoreHTTPSErrors: true,
|
||||
|
@ -157,7 +157,7 @@ export default class SiteInfo extends Command {
|
|||
const page = await browser.newPage();
|
||||
await page.goto(`https://${args[0]}`);
|
||||
screenshotData = await page.screenshot();
|
||||
browser.close();
|
||||
await browser.close();
|
||||
} catch (e) {
|
||||
this.client.util.signale.error(e);
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ export default class SiteInfo extends Command {
|
|||
const embed = new RichEmbed();
|
||||
embed.addField('Web Software', r.headers['server'] ?? 'N/A', true);
|
||||
embed.addField('Content Type', r.headers['content-type'] ? r.headers['content-type'].split(';')[0] : 'N/A', true);
|
||||
embed.addField('Content Length', r.headers['content-length'] ? this.client.util.dataConversion(r.headers['content-length']) : 'N/A', true);
|
||||
embed.addField('Content Length', r.headers['content-length'] ? this.client.util.dataConversion(Number(r.headers['content-length'])) : 'N/A', true);
|
||||
return embed.fields;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue