To avoid having to change every emoji from every file whenever I switch an emoji, I decided to place an emojis.json and call the emoji from there.
emojis.json
{
"loading": "<a:loading:847653387343626301>",
"pressf": "<:pressf:862166705911758909>"
}
Exampleping.js
const emoji = require('../emojis.json')
module.exports = {
name: 'ping',
execute(message, args) {
message.channel.send(`${emoji.loading}Pong.`)
}
}
Is this the right way? I'm open to new/better ideas.
Btw it errors: code: 'MODULE_NOT_FOUND',