mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
add forward support to audio
This commit is contained in:
parent
7f5644799e
commit
b676182d86
2 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,7 @@ const { createEmbed } = require('#utils/embed');
|
|||
const { acknowledge } = require('#utils/interactions');
|
||||
const { editOrReply } = require('#utils/message');
|
||||
|
||||
const { ApplicationCommandTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");;
|
||||
const { ApplicationCommandTypes, InteractionContextTypes, ApplicationIntegrationTypes } = require("detritus-client/lib/constants");
|
||||
|
||||
const superagent = require('superagent')
|
||||
|
||||
|
@ -28,6 +28,7 @@ module.exports = {
|
|||
const { message } = args;
|
||||
|
||||
let urls = message.content.match(urlr)
|
||||
if(message.messageSnapshots?.length >= 1) urls = message.messageSnapshots.first().message.content.match(urlr);
|
||||
if(urls){
|
||||
try{
|
||||
let songlink = await superagent.get(`https://api.song.link/v1-alpha.1/links`)
|
||||
|
|
|
@ -33,6 +33,7 @@ module.exports = {
|
|||
return editOrReply(context, createEmbed("error", context, "Unable to fetch message."))
|
||||
}
|
||||
let urls = msg.content.match(urlr)
|
||||
if(msg.messageSnapshots?.length >= 1) urls = msg.messageSnapshots.first().message.content.match(urlr);
|
||||
if (urls) {
|
||||
let songlink = await superagent.get(`https://api.song.link/v1-alpha.1/links`)
|
||||
.query({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue