mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -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 { acknowledge } = require('#utils/interactions');
|
||||||
const { editOrReply } = require('#utils/message');
|
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')
|
const superagent = require('superagent')
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ module.exports = {
|
||||||
const { message } = args;
|
const { message } = args;
|
||||||
|
|
||||||
let urls = message.content.match(urlr)
|
let urls = message.content.match(urlr)
|
||||||
|
if(message.messageSnapshots?.length >= 1) urls = message.messageSnapshots.first().message.content.match(urlr);
|
||||||
if(urls){
|
if(urls){
|
||||||
try{
|
try{
|
||||||
let songlink = await superagent.get(`https://api.song.link/v1-alpha.1/links`)
|
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."))
|
return editOrReply(context, createEmbed("error", context, "Unable to fetch message."))
|
||||||
}
|
}
|
||||||
let urls = msg.content.match(urlr)
|
let urls = msg.content.match(urlr)
|
||||||
|
if(msg.messageSnapshots?.length >= 1) urls = msg.messageSnapshots.first().message.content.match(urlr);
|
||||||
if (urls) {
|
if (urls) {
|
||||||
let songlink = await superagent.get(`https://api.song.link/v1-alpha.1/links`)
|
let songlink = await superagent.get(`https://api.song.link/v1-alpha.1/links`)
|
||||||
.query({
|
.query({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue