mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
Fix?
This commit is contained in:
+13
-18
@@ -1,22 +1,17 @@
|
|||||||
const { Structures, APIMessage } = require('discord.js');
|
const { Message, APIMessage } = require('discord.js');
|
||||||
|
|
||||||
module.exports = Structures.extend('Message', Message => {
|
Reflect.defineProperty(Message.prototype, 'say', { value: function (content, options) {
|
||||||
class CommandMessage extends Message {
|
return this.channel.send(content, options);
|
||||||
say(content, options) {
|
} });
|
||||||
return this.channel.send(content, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
embed(embed, options) {
|
Reflect.defineProperty(Message.prototype, 'embed', { value: function (embed, options) {
|
||||||
return this.channel.send(new APIMessage(this.channel, { embed, ...options }));
|
return this.channel.send(new APIMessage(this.channel, { embed, ...options }));
|
||||||
}
|
} });
|
||||||
|
|
||||||
code(lang, content, options) {
|
Reflect.defineProperty(Message.prototype, 'code', { value: function (lang, content, options) {
|
||||||
return this.channel.send(content, { code: lang, ...options });
|
return this.channel.send(content, { code: lang, ...options });
|
||||||
}
|
} });
|
||||||
|
|
||||||
direct(content, options) {
|
Reflect.defineProperty(Message.prototype, 'direct', { value: function (content, options) {
|
||||||
return this.author.send(content, options);
|
return this.author.send(content, options);
|
||||||
}
|
} });
|
||||||
}
|
|
||||||
return CommandMessage;
|
|
||||||
});
|
|
||||||
|
|||||||
Reference in New Issue
Block a user