Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
Project: literally i have no time to fix these random errors so patch…
Browse files Browse the repository at this point in the history
… them up for now
  • Loading branch information
RadiatedExodus committed Jul 16, 2024
1 parent ccc4a0b commit 9187a14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/classes/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class MeteoriumClient extends Client<true> {
public interactions = new MeteoriumInteractionManager(this);
public events = new MeteoriumEventManager(this);
public holodex = new HolodexApiClient({ apiKey: this.config.HolodexApiKey });
public player = new Player(this);
public player = new Player(this as any);
public playerLyricsExtractor = lyricsExtractor(this.config.GeniusApiKey);

public constructor(options: ClientOptions) {
Expand Down
9 changes: 7 additions & 2 deletions src/interactions/commands/fun/music.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export const Command: MeteoriumChatCommand = {
content: "You are not in a voice channel.",
});

if (!channel.isVoiceBased())
return await interaction.editReply({
content: "This is not a voice channel.",
});

if (
interaction.guild.members.me?.voice.channelId &&
interaction.member.voice.channelId !== interaction.guild.members.me?.voice.channelId
Expand All @@ -71,14 +76,14 @@ export const Command: MeteoriumChatCommand = {
});

const search = await client.player.search(query, {
requestedBy: interaction.user,
requestedBy: interaction.user.id,
});
if (!search.hasTracks())
return await interaction.editReply({
content: "No tracks found.",
});

await client.player.play(channel, search, {
await client.player.play(channel as any, search, {
nodeOptions: {
metadata: interaction,
selfDeaf: true,
Expand Down

0 comments on commit 9187a14

Please sign in to comment.