remove constants directory

This commit is contained in:
Emily 2020-11-10 14:31:49 +11:00
parent c297e45a64
commit 4d8eecff04
19 changed files with 74 additions and 79 deletions

View file

@ -1,5 +1,3 @@
const Embed = require('../../util/embed');
module.exports = class {
constructor (name, category) {
this.name = name,
@ -38,7 +36,7 @@ module.exports = class {
}
}
const embed = new Embed()
const embed = new client.RichEmbed()
.setTitle(colour)
.setColour(colour)
.setImage(`https://fakeimg.pl/256x256/${colour.replace('#', '')}/?text=%20`);

View file

@ -1,5 +1,4 @@
const fetch = require('node-fetch');
const Embed = require('../../util/embed');
module.exports = class {
constructor (name, category) {
@ -26,7 +25,7 @@ module.exports = class {
fetch('https://garfield-comics.glitch.me/~SRoMG/?date=' + date)
.then(res => res.json())
.then(json => {
const embed = new Embed()
const embed = new client.RichEmbed()
.setTitle(`${json.data.name} (No. ${json.data.number})`)
.setColour(client.functions.displayHexColour(message.channel.guild, client.user.id))
.setURL('https://www.mezzacotta.net/garfield/?comic=' + json.data.number)
@ -34,7 +33,7 @@ module.exports = class {
message.channel.createMessage({ embed: embed });
})
.catch(err => {
message.channel.createMessage(`${client.constants.emojis.botError} An error has occurred: ${err}`);
message.channel.createMessage(`${client.emojis.botError} An error has occurred: ${err}`);
});
}
};

View file

@ -25,7 +25,7 @@ module.exports = class {
.then(res => res.text())
.then(body => message.channel.createMessage(body));
} catch (err) {
message.channel.createMessage(`${client.constants.emojis.botError} An error has occurred: ${err}`);
message.channel.createMessage(`${client.emojis.botError} An error has occurred: ${err}`);
}
}
};