Skip to content

Instantly share code, notes, and snippets.

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

Ashley P Alespren

🔨
Building a robot
  • America
View GitHub Profile
@Alespren
Alespren / ExtendedMessage.js
Last active April 30, 2021 15:50 — forked from Allvaa/ExtendedMessage.js
Discord.js v12 Inline Replies w/ Default Mention Settings
const { APIMessage, Structures } = require("discord.js");
class ExtAPIMessage extends APIMessage {
resolveData() {
if (this.data) return this;
super.resolveData();
if ((this.options.allowedMentions || {}).repliedUser !== undefined) {
if (this.data.allowed_mentions === undefined) this.data.allowed_mentions = {};
Object.assign(this.data.allowed_mentions, { replied_user: this.options.allowedMentions.repliedUser });
delete this.options.allowedMentions.repliedUser;