forked from Supositware/Haha-Yes
Don't accept playlist (They didn't work already before)
This commit is contained in:
parent
0c38de9ea2
commit
16842d7127
1 changed files with 5 additions and 0 deletions
|
@ -18,6 +18,11 @@ export default {
|
||||||
cooldown: 86400,
|
cooldown: 86400,
|
||||||
async execute(interaction, args) {
|
async execute(interaction, args) {
|
||||||
const url = args.url;
|
const url = args.url;
|
||||||
|
// This is rather rudementary, a proper way would be using yt-dlp to know if it is a playlist
|
||||||
|
if (url.includes('list=')) {
|
||||||
|
return interaction.reply({ content: '❌ Playlists are not allowed!', ephemeral: true });
|
||||||
|
}
|
||||||
|
|
||||||
if (!await utils.stringIsAValidurl(url)) {
|
if (!await utils.stringIsAValidurl(url)) {
|
||||||
console.error(`Not a url!!! ${url}`);
|
console.error(`Not a url!!! ${url}`);
|
||||||
return interaction.reply({ content: '❌ This does not look like a valid url!', ephemeral: true });
|
return interaction.reply({ content: '❌ This does not look like a valid url!', ephemeral: true });
|
||||||
|
|
Loading…
Reference in a new issue