merge-requests/4/head
loicbersier 5 years ago
parent 3ed3bdd376
commit 20f96b57ca

@ -25,7 +25,7 @@ class BotAvatarCommand extends Command {
let Attachment = (message.attachments).array(); let Attachment = (message.attachments).array();
let image = args.image; let image = args.image;
if (!Attachment[0] && !image) if (!Attachment[0] && !image)
return message.say('You didint provide any images'); return message.say('You didn\'t provide any images');
else if (image && !Attachment[0]) { else if (image && !Attachment[0]) {
this.client.user.setAvatar(image) this.client.user.setAvatar(image)
.catch(() => message.channel.send('The link you provided dosen\'t work... is it a picture?')); .catch(() => message.channel.send('The link you provided dosen\'t work... is it a picture?'));

@ -42,7 +42,7 @@ class TranslationCommand extends Command {
return response.json(); return response.json();
}).then((response) => { }).then((response) => {
if (response.code == '502') if (response.code == '502')
return message.channel.send(`${response.message}, you probably didin't input the correct language code, you can check them here! https://tech.yandex.com/translate/doc/dg/concepts/api-overview-docpage/`); return message.channel.send(`${response.message}, you probably didn't input the correct language code, you can check them here! https://tech.yandex.com/translate/doc/dg/concepts/api-overview-docpage/`);
else if (response.code != '200') else if (response.code != '200')
return message.channel.send('An error has occured'); return message.channel.send('An error has occured');

Loading…
Cancel
Save