Skip to content

Instantly share code, notes, and snippets.

View Allvaa's full-sized avatar

Allvaa Allvaa

View GitHub Profile
@Allvaa
Allvaa / package.json
Created October 2, 2023 16:11
Simple package.json script to clean your dist directory!
"scripts": {
"clean": "node -e 'require(`node:fs`).rmSync(require(`node:path`).resolve(`dist`),{recursive:true,force:true})'"
}
discord: ephemeral#5338
discord server: discord.gg/5k7nA66
@Allvaa
Allvaa / ExtendedMessage.js
Last active April 16, 2024 18:28
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 });