Files
xiao/framework/Extensions.js
T
Dragon Fire 84712c2091 Fix?
2021-08-02 18:18:39 -04:00

18 lines
678 B
JavaScript

const { Message, APIMessage } = require('discord.js');
Reflect.defineProperty(Message.prototype, 'say', { value: function (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 }));
} });
Reflect.defineProperty(Message.prototype, 'code', { value: function (lang, content, options) {
return this.channel.send(content, { code: lang, ...options });
} });
Reflect.defineProperty(Message.prototype, 'direct', { value: function (content, options) {
return this.author.send(content, options);
} });