Skip to content

Instantly share code, notes, and snippets.

View Alespren's full-sized avatar
🔨
Building a robot

Ashley Pedersen Alespren

🔨
Building a robot
  • America
View GitHub Profile
@Allvaa
Allvaa / ExtendedMessage.js
Last active August 31, 2024 18:08
Discord.js v12 Inline Replies
const { APIMessage, Structures } = require("discord.js");
class ExtAPIMessage extends APIMessage {
resolveData() {
if (this.data) return this;
super.resolveData();
const allowedMentions = this.options.allowedMentions || this.target.client.options.allowedMentions || {};
if (allowedMentions.repliedUser !== undefined) {
if (this.data.allowed_mentions === undefined) this.data.allowed_mentions = {};
Object.assign(this.data.allowed_mentions, { replied_user: allowedMentions.repliedUser });