Make processing emoji an environment variable (#83)
This commit is contained in:
parent
07e1fa8dc2
commit
3dd7fa4ed8
7 changed files with 11 additions and 6 deletions
|
@ -27,6 +27,11 @@ PREFIX=&
|
|||
# Optional
|
||||
###########
|
||||
|
||||
# Put the emoji for processing messages here
|
||||
# Example:
|
||||
# PROCESSING_EMOJI=<a:processing:818243325891051581>
|
||||
PROCESSING_EMOJI=
|
||||
|
||||
# Put Cat API token here
|
||||
CAT=
|
||||
# Put Mashape/RapidAPI key here
|
||||
|
|
|
@ -5,7 +5,7 @@ exports.run = async (message, args) => {
|
|||
if (image === undefined) return `${message.author.mention}, you need to provide an image/GIF to add a caption!`;
|
||||
const newArgs = args.filter(item => !item.includes(image.url) );
|
||||
if (args.length === 0) return `${message.author.mention}, you need to provide some text to add a caption!`;
|
||||
const processMessage = await message.channel.createMessage("<a:processing:479351417102925854> Processing... This might take a while");
|
||||
const processMessage = await message.channel.createMessage(`${process.env.PROCESSING_EMOJI || "<a:processing:479351417102925854>"} Processing... This might take a while`);
|
||||
const { buffer, type } = await magick.run({
|
||||
cmd: "caption",
|
||||
path: image.path,
|
||||
|
|
|
@ -5,7 +5,7 @@ exports.run = async (message, args) => {
|
|||
const image = await require("../utils/imagedetect.js")(message);
|
||||
if (image === undefined) return `${message.author.mention}, you need to provide an image/GIF to add a caption!`;
|
||||
const newArgs = args.filter(item => !item.includes(image.url) );
|
||||
const processMessage = await message.channel.createMessage("<a:processing:479351417102925854> Processing... This might take a while");
|
||||
const processMessage = await message.channel.createMessage(`${process.env.PROCESSING_EMOJI || "<a:processing:479351417102925854>"} Processing... This might take a while`);
|
||||
const { buffer, type } = await magick.run({
|
||||
cmd: "captionTwo",
|
||||
path: image.path,
|
||||
|
|
|
@ -3,7 +3,7 @@ const magick = require("../utils/image.js");
|
|||
exports.run = async (message) => {
|
||||
const image = await require("../utils/imagedetect.js")(message);
|
||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to spin!`;
|
||||
const processMessage = await message.channel.createMessage("<a:processing:479351417102925854> Processing... This might take a while");
|
||||
const processMessage = await message.channel.createMessage(`${process.env.PROCESSING_EMOJI || "<a:processing:479351417102925854>"} Processing... This might take a while`);
|
||||
const { buffer } = await magick.run({
|
||||
cmd: "globe",
|
||||
path: image.path,
|
||||
|
|
|
@ -3,7 +3,7 @@ const magick = require("../utils/image.js");
|
|||
exports.run = async (message) => {
|
||||
const image = await require("../utils/imagedetect.js")(message);
|
||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add some magik!`;
|
||||
const processMessage = await message.channel.createMessage("<a:processing:479351417102925854> Processing... This might take a while");
|
||||
const processMessage = await message.channel.createMessage(`${process.env.PROCESSING_EMOJI || "<a:processing:479351417102925854>"} Processing... This might take a while`);
|
||||
const { buffer, type } = await magick.run({
|
||||
cmd: "magik",
|
||||
path: image.path,
|
||||
|
|
|
@ -5,7 +5,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!`;
|
||||
const newArgs = args.filter(item => !item.includes(image.url) );
|
||||
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(`${process.env.PROCESSING_EMOJI || "<a:processing:479351417102925854>"} Processing... This might take a while`);
|
||||
const [topText, bottomText] = newArgs.join(" ").split(/(?<!\\),/).map(elem => elem.trim());
|
||||
const { buffer, type } = await magick.run({
|
||||
cmd: "motivate",
|
||||
|
|
|
@ -3,7 +3,7 @@ const magick = require("../utils/image.js");
|
|||
exports.run = async (message) => {
|
||||
const image = await require("../utils/imagedetect.js")(message);
|
||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to spin!`;
|
||||
const processMessage = await message.channel.createMessage("<a:processing:479351417102925854> Processing... This might take a while");
|
||||
const processMessage = await message.channel.createMessage(`${process.env.PROCESSING_EMOJI || "<a:processing:479351417102925854>"} Processing... This might take a while`);
|
||||
const { buffer } = await magick.run({
|
||||
cmd: "spin",
|
||||
path: image.path,
|
||||
|
|
Loading…
Reference in a new issue