Actually made screenshot owner-only, made image API interaction more secure

This commit is contained in:
TheEssem 2020-12-14 12:39:18 -06:00
parent 78ae47dbbb
commit 69d8100f23
3 changed files with 39 additions and 32 deletions

View file

@ -5,6 +5,7 @@ puppeteer.use(StealthPlugin());
const fetch = require("node-fetch");
exports.run = async (message, args) => {
if (message.author.id !== process.env.OWNER) return `${message.author.mention}, only the bot owner can run this command!`;
message.channel.sendTyping();
if (args.length === 0) return `${message.author.mention}, you need to provide a URL to screenshot!`;
const getEndpoint = await fetch(`http://${process.env.CHROME}/json/version`);
@ -28,5 +29,5 @@ exports.run = async (message, args) => {
};
exports.aliases = ["webshot", "ss", "shot", "page"];
exports.category = 1;
exports.category = 8;
exports.help = "Screenshots a webpage";