Skip to content

Instantly share code, notes, and snippets.

View GroovyGab's full-sized avatar
🌏
localhost

gabb GroovyGab

🌏
localhost
View GitHub Profile
@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 });
@fantattitude
fantattitude / gist:3627354
Created September 4, 2012 22:21
Spotify URL Regexp
spotifyReg = /(https?:\/\/open.spotify.com\/(track|user|artist|album)\/[a-zA-Z0-9]+(\/playlist\/[a-zA-Z0-9]+|)|spotify:(track|user|artist|album):[a-zA-Z0-9]+(:playlist:[a-zA-Z0-9]+|))/