mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Discord.js v14
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable */
|
||||
const { Message } = require('discord.js');
|
||||
const { Message, EmbedBuilder } = require('discord.js');
|
||||
|
||||
Reflect.defineProperty(Message.prototype, 'say', { value: function (content, options) {
|
||||
if (typeof content === 'object') return this.channel.send(content);
|
||||
@@ -23,4 +23,12 @@ Reflect.defineProperty(Message.prototype, 'reply', { value: function (content, o
|
||||
if (typeof content === 'object') return this.channel.send(content, { reply: { messageReference: this } });
|
||||
return this.channel.send({ content, ...options, reply: { messageReference: this } });
|
||||
} });
|
||||
|
||||
Reflect.defineProperty(EmbedBuilder.prototype, 'addField', { value: function (name, value, inline = false) {
|
||||
return this.addFields([{ name, value, inline }]);
|
||||
} });
|
||||
|
||||
Reflect.defineProperty(EmbedBuilder.prototype, 'addBlankField', { value: function (inline = false) {
|
||||
return this.addFields([{ name: '\u200b', value: '\u200b', inline }]);
|
||||
} });
|
||||
/* eslint-enable */
|
||||
|
||||
Reference in New Issue
Block a user