Make processing emoji an environment variable (#83)

This commit is contained in:
Lewis Crichton 2021-03-19 15:26:17 +00:00 committed by GitHub
parent 07e1fa8dc2
commit 3dd7fa4ed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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",

View File

@ -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,