Updated eslint parser to use ES2019, allow using backspace before comma in meme/motivate
This commit is contained in:
parent
b853345960
commit
fe58a6a370
3 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
"extends": ["eslint:recommended", "plugin:promise/recommended"],
|
"extends": ["eslint:recommended", "plugin:promise/recommended"],
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
"ecmaVersion": 2017
|
"ecmaVersion": 2019
|
||||||
},
|
},
|
||||||
"plugins": ["promise"],
|
"plugins": ["promise"],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
|
|
@ -7,7 +7,7 @@ exports.run = async (message, args) => {
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to generate a meme!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to generate a meme!`;
|
||||||
if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate a meme!`;
|
if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate a meme!`;
|
||||||
const [topText, bottomText] = args.join(" ").split(",").map(elem => elem.trim());
|
const [topText, bottomText] = args.join(" ").split(/(?<!\\),/).map(elem => elem.trim());
|
||||||
const file = `/tmp/${Math.random().toString(36).substring(2, 15)}.miff`;
|
const file = `/tmp/${Math.random().toString(36).substring(2, 15)}.miff`;
|
||||||
const file2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
const file2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
||||||
const file3 = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
const file3 = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
||||||
|
|
|
@ -7,7 +7,7 @@ exports.run = async (message, args) => {
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image/GIF to make a motivational poster!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image/GIF to make a motivational poster!`;
|
||||||
if (args.length === 0) return `${message.author.mention}, you need to provide some text to make a motivational poster!`;
|
if (args.length === 0) return `${message.author.mention}, you need to provide some text to make a motivational poster!`;
|
||||||
const processMessage = await message.channel.createMessage("<a:processing:479351417102925854> Processing... This might take a while");
|
const processMessage = await message.channel.createMessage("<a:processing:479351417102925854> Processing... This might take a while");
|
||||||
const [topText, bottomText] = args.join(" ").split(",").map(elem => elem.trim());
|
const [topText, bottomText] = args.join(" ").split(/(?<!\\),/).map(elem => elem.trim());
|
||||||
const file = `/tmp/${Math.random().toString(36).substring(2, 15)}.miff`;
|
const file = `/tmp/${Math.random().toString(36).substring(2, 15)}.miff`;
|
||||||
const text = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
const text = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
||||||
const text2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
const text2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
||||||
|
|
Loading…
Reference in a new issue