This commit is contained in:
Dragon Fire
2021-08-02 19:53:28 -04:00
parent 1e51b2442f
commit 3192f2aa90
3 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -1,17 +1,17 @@
const { Message, APIMessage } = require('discord.js');
const { Message, MessagePayload, APIMessage } = require('discord.js');
Reflect.defineProperty(Message.prototype, 'say', { value: function (content, options) {
return this.channel.send(content, options);
return this.channel.send({ content, ...options });
} });
Reflect.defineProperty(Message.prototype, 'embed', { value: function (embed, options) {
return this.channel.send(new APIMessage(this.channel, { embed, ...options }));
return this.channel.send({ embeds: [embed], ...options });
} });
Reflect.defineProperty(Message.prototype, 'code', { value: function (lang, content, options) {
return this.channel.send(content, { code: lang, ...options });
return this.channel.send({ content, lang, ...options });
} });
Reflect.defineProperty(Message.prototype, 'direct', { value: function (content, options) {
return this.author.send(content, options);
return this.author.send({ content, options });
} });