forked from Galactic/galactic-bot
default embed colour
This commit is contained in:
parent
3423828dac
commit
bc261f3c1c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user