loading message

This commit is contained in:
Loic Bersier 2018-12-30 05:31:00 +01:00
parent e9f70c4eb9
commit 6a0a30ee7e
6 changed files with 17 additions and 1 deletions

View file

@ -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 <a:loadingmin:527579785212329984>')
.then(loadingmsg => loadingmsg.delete(1000))
const canvas = createCanvas(528, 559)
const ctx = canvas.getContext('2d')

View file

@ -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 <a:loadingmin:527579785212329984>')
.then(loadingmsg => loadingmsg.delete(1000))
const canvas = createCanvas(310, 400)
const ctx = canvas.getContext('2d')

View file

@ -21,6 +21,8 @@ class IdubbbzCommand extends Command {
else if (!image)
image = Attachment[0].url
message.channel.send('Processing <a:loadingmin:527579785212329984>')
.then(loadingmsg => loadingmsg.delete(1000))
const canvas = createCanvas(1281, 627)
const applyText = (canvas, text) => {

View file

@ -21,6 +21,9 @@ class IdubbbzPaintCommand extends Command {
else if (!image)
image = Attachment[0].url
message.channel.send('Processing <a:loadingmin:527579785212329984>')
.then(loadingmsg => loadingmsg.delete(1000))
const canvas = createCanvas(1024, 544)
const applyText = (canvas, text) => {
const ctx = canvas.getContext('2d');

View file

@ -27,6 +27,9 @@ class LikeCommand extends Command {
else if (!image)
image = Attachment[0].url
message.channel.send('Processing <a:loadingmin:527579785212329984>')
.then(loadingmsg => loadingmsg.delete(1000))
const canvas = createCanvas(386, 399)
const ctx = canvas.getContext('2d')
const background = await loadImage(image);

View file

@ -28,6 +28,9 @@ class UglyCommand extends Command {
else if (!image)
image = Attachment[0].url
message.channel.send('Processing <a:loadingmin:527579785212329984>')
.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 => {