From 2afdfeefaef25a2634c9240bf4ef949704ee4841 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 15 Oct 2018 15:48:10 +0200 Subject: [PATCH] reverted changes --- commands/images/god.js | 4 +--- commands/images/human.js | 4 +--- commands/images/idubbbz.js | 4 +--- commands/images/idubbbzpaint.js | 4 +--- commands/images/like.js | 4 +--- commands/images/ugly.js | 4 +--- 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/commands/images/god.js b/commands/images/god.js index 396849b..636e360 100644 --- a/commands/images/god.js +++ b/commands/images/god.js @@ -26,9 +26,7 @@ module.exports = class godCommand extends Command { const ctx = canvas.getContext('2d') const background = await loadImage(image); ctx.drawImage(background, 20, 80, 275, 250); - const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/42/1/1539555260-untitled.png').catch(error => { - message.say('an error as occured. please try again.') - }); + const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/42/1/1539555260-untitled.png'); const bg = await loadImage(buffer); ctx.drawImage(bg, 0, 0, canvas.width, canvas.height); diff --git a/commands/images/human.js b/commands/images/human.js index 0b30fb8..212b914 100644 --- a/commands/images/human.js +++ b/commands/images/human.js @@ -24,9 +24,7 @@ module.exports = class humanCommand extends Command { const canvas = createCanvas(578, 400) const ctx = canvas.getContext('2d') - const background = await loadImage('https://image.noelshack.com/fichiers/2018/42/1/1539594726-untitled.png').catch(error => { - message.say('an error as occured. please try again.') - }); + const background = await loadImage('https://image.noelshack.com/fichiers/2018/42/1/1539594726-untitled.png'); ctx.drawImage(background, 0, 0, canvas.width, canvas.height); const { body: buffer } = await superagent.get(image); const bg = await loadImage(buffer); diff --git a/commands/images/idubbbz.js b/commands/images/idubbbz.js index 5c29497..8c7e767 100644 --- a/commands/images/idubbbz.js +++ b/commands/images/idubbbz.js @@ -50,9 +50,7 @@ module.exports = class idubbbzCommand extends Command { const ctx = canvas.getContext('2d') const background = await loadImage(image); ctx.drawImage(background, 620, 100, 200, 200); - const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/41/7/1539510207-untitled.png').catch(error => { - message.say('an error as occured. please try again.') - }); + const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/41/7/1539510207-untitled.png'); const bg = await loadImage(buffer); ctx.drawImage(bg, 0, 0, canvas.width, canvas.height); ctx.font = applyText(canvas, text) diff --git a/commands/images/idubbbzpaint.js b/commands/images/idubbbzpaint.js index 341ec9a..e6c97e7 100644 --- a/commands/images/idubbbzpaint.js +++ b/commands/images/idubbbzpaint.js @@ -50,9 +50,7 @@ module.exports = class idubbbzpaintCommand extends Command { const ctx = canvas.getContext('2d') const background = await loadImage(image); ctx.drawImage(background, 140, 30, 400, 400); - const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/41/7/1539533685-untitled.png').catch(error => { - message.say('an error as occured. please try again.') - }); + const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/41/7/1539533685-untitled.png'); const bg = await loadImage(buffer); ctx.drawImage(bg, 0, 0, canvas.width, canvas.height); ctx.font = applyText(canvas, text) diff --git a/commands/images/like.js b/commands/images/like.js index 0c7195f..7bb0d7f 100644 --- a/commands/images/like.js +++ b/commands/images/like.js @@ -26,9 +26,7 @@ module.exports = class likeCommand extends Command { const ctx = canvas.getContext('2d') const background = await loadImage(image); ctx.drawImage(background, 40, 0, 300, 255); - const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/41/7/1539547403-untitled.png').catch(error => { - message.say('an error as occured. please try again.') - }); + const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/41/7/1539547403-untitled.png'); const bg = await loadImage(buffer); ctx.drawImage(bg, 0, 0, canvas.width, canvas.height); diff --git a/commands/images/ugly.js b/commands/images/ugly.js index 0f510eb..0d876eb 100644 --- a/commands/images/ugly.js +++ b/commands/images/ugly.js @@ -24,9 +24,7 @@ module.exports = class uglyCommand extends Command { 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 => { - message.say('an error as occured. please try again.') - }); + const background = await loadImage('https://image.noelshack.com/fichiers/2018/42/1/1539598678-untitled.png'); ctx.drawImage(background, 0, 0, canvas.width, canvas.height); const { body: buffer } = await superagent.get(image); const bg = await loadImage(buffer);