From 6a0a30ee7ede942f851b3fcacfacc4eb40b21a03 Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Sun, 30 Dec 2018 05:31:00 +0100 Subject: [PATCH] loading message --- commands/images/fetish.js | 3 +++ commands/images/god.js | 4 +++- commands/images/idubbbz.js | 2 ++ commands/images/idubbbzpaint.js | 3 +++ commands/images/like.js | 3 +++ commands/images/ugly.js | 3 +++ 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/commands/images/fetish.js b/commands/images/fetish.js index 4fe5ef8e..c9e4fdd8 100644 --- a/commands/images/fetish.js +++ b/commands/images/fetish.js @@ -26,6 +26,9 @@ class FetishCommand extends Command { return message.channel.send('Gif dosent work, sorry') else if (!image) image = Attachment[0].url + + message.channel.send('Processing ') + .then(loadingmsg => loadingmsg.delete(1000)) const canvas = createCanvas(528, 559) const ctx = canvas.getContext('2d') diff --git a/commands/images/god.js b/commands/images/god.js index e645b768..28cea928 100644 --- a/commands/images/god.js +++ b/commands/images/god.js @@ -21,7 +21,9 @@ class GodCommand extends Command { return message.channel.send('Gif dosent work, sorry') else if (!image) image = Attachment[0].url - + + message.channel.send('Processing ') + .then(loadingmsg => loadingmsg.delete(1000)) const canvas = createCanvas(310, 400) const ctx = canvas.getContext('2d') diff --git a/commands/images/idubbbz.js b/commands/images/idubbbz.js index 8776510a..ee3663ca 100644 --- a/commands/images/idubbbz.js +++ b/commands/images/idubbbz.js @@ -21,6 +21,8 @@ class IdubbbzCommand extends Command { else if (!image) image = Attachment[0].url + message.channel.send('Processing ') + .then(loadingmsg => loadingmsg.delete(1000)) const canvas = createCanvas(1281, 627) const applyText = (canvas, text) => { diff --git a/commands/images/idubbbzpaint.js b/commands/images/idubbbzpaint.js index 1906ec6e..f9078f38 100644 --- a/commands/images/idubbbzpaint.js +++ b/commands/images/idubbbzpaint.js @@ -21,6 +21,9 @@ class IdubbbzPaintCommand extends Command { else if (!image) image = Attachment[0].url + message.channel.send('Processing ') + .then(loadingmsg => loadingmsg.delete(1000)) + const canvas = createCanvas(1024, 544) const applyText = (canvas, text) => { const ctx = canvas.getContext('2d'); diff --git a/commands/images/like.js b/commands/images/like.js index 064bb6b3..d7307f42 100644 --- a/commands/images/like.js +++ b/commands/images/like.js @@ -27,6 +27,9 @@ class LikeCommand extends Command { else if (!image) image = Attachment[0].url + message.channel.send('Processing ') + .then(loadingmsg => loadingmsg.delete(1000)) + const canvas = createCanvas(386, 399) const ctx = canvas.getContext('2d') const background = await loadImage(image); diff --git a/commands/images/ugly.js b/commands/images/ugly.js index 8292a447..ea10347b 100644 --- a/commands/images/ugly.js +++ b/commands/images/ugly.js @@ -28,6 +28,9 @@ class UglyCommand extends Command { else if (!image) image = Attachment[0].url + message.channel.send('Processing ') + .then(loadingmsg => loadingmsg.delete(1000)) + const canvas = createCanvas(323, 400) const ctx = canvas.getContext('2d') const background = await loadImage('https://image.noelshack.com/fichiers/2018/42/1/1539598678-untitled.png').catch(error => {