Skip to content

Commit

Permalink
Restrict
Browse files Browse the repository at this point in the history
  • Loading branch information
Blocksnmore committed Dec 16, 2024
1 parent cc6220e commit 0942191
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions commands/music/play.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,23 +246,29 @@ export default class Play extends Command {
}
}

const bannedSongIDs = ["vhpxylukBxo"];
if (
["916006382594064385", "725103887584985088"].includes(
ctx.guild!.id,
)
) {
const bannedSongIDs = ["vhpxylukBxo"];

for (const song of songsToAdd) {
if (song.url == undefined) continue;
const url = new URL(song.url);
const id = url.searchParams.get("v");
if (id != null && bannedSongIDs.includes(id)) {
await message.edit(undefined, {
embeds: [
new Embed({
title: "no",
description: "nice try"
}).setColor("red")
],
components: []
});
return;
for (const song of songsToAdd) {
if (song.url == undefined) continue;
const url = new URL(song.url);
const id = url.searchParams.get("v");
if (id != null && bannedSongIDs.includes(id)) {
await message.edit(undefined, {
embeds: [
new Embed({
title: "no",
description: "nice try",
}).setColor("red"),
],
components: [],
});
return;
}
}
}

Expand Down

0 comments on commit 0942191

Please sign in to comment.