Discord.js v14

This commit is contained in:
Dragon Fire
2024-04-07 19:06:19 -04:00
parent 58c81aa912
commit f59826f7ab
272 changed files with 893 additions and 656 deletions
+9 -1
View File
@@ -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 */