diff --git a/structure/extensions/Message.js b/structure/extensions/Message.js index 79c7fab..19383b6 100644 --- a/structure/extensions/Message.js +++ b/structure/extensions/Message.js @@ -19,11 +19,12 @@ const Message = Structures.extend('Message', (Message) => { } - format(index, parameters = {}) { + format(index, parameters = { }) { let language = this.author._settings.locale || 'en_us'; if(this.guild && this.guild._settings.locale) language = this.guild._settings.locale; + parameters.prefix = this.guild && this.guild._settings.prefix ? this.guild._settings.prefix : this.client._options.bot.prefix ; let template = this.client.localeLoader.template(language, index); //.languages[language][index]; for (const [param, val] of Object.entries(parameters)) { template = template.replace(new RegExp(`{${escapeRegex(param.toLowerCase())}}`, 'gi'), val); @@ -50,6 +51,7 @@ const Message = Structures.extend('Message', (Message) => { async embed(embed, opts = {}) { + if (!embed.color) embed.color = 619452; let send = { content: opts.reply ? `<@${this.author.id}>` : '', embed }; this._pending = await this.channel.send(send); return this._pending;