Skip to content

Commit

Permalink
Fix custom music tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
MateiSR committed Mar 8, 2024
1 parent 84c37ad commit 26c2e54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions config/custom_music.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
"url": "https://s0.mateisr.com/files/colaj_manele.mp3",
"callWords": ["colaj", "manele"],
"emote": "🥁"
},
{
"url": "https://www.youtube.com/watch?v=k85mRPqvMbE",
"callWords": ["crazy frog"],
"emote": "🐸"
}
]
}
3 changes: 1 addition & 2 deletions src/events/customTrackEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export default new Event("messageCreate", async (message: Message) => {
)) as LavalinkResponse | null;
if (!result || result.loadType == "empty" || result.loadType == "error")
return;
const searchResult = result.data as Track[];
const track = searchResult.shift();
const track = result.data as Track;
// Handle dispatcher
const res = await client.manager.handleDispatcher({
guildId: guild.id,
Expand Down

0 comments on commit 26c2e54

Please sign in to comment.