music: fix createMessage calls
This commit is contained in:
		
							parent
							
								
									e1719fb12c
								
							
						
					
					
						commit
						8d47c64fd8
					
				
					 1 changed files with 12 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -175,9 +175,9 @@ async function createVoiceConnection(guild_id, voice_id, text_id) {
 | 
			
		|||
        await hf.bot.guilds
 | 
			
		||||
          .get(guild_id)
 | 
			
		||||
          .channels.get(text_id)
 | 
			
		||||
          .createMessage(
 | 
			
		||||
            ":musical_note: Queue is empty, leaving voice channel."
 | 
			
		||||
          );
 | 
			
		||||
          .createMessage({
 | 
			
		||||
            content: ":musical_note: Queue is empty, leaving voice channel.",
 | 
			
		||||
          });
 | 
			
		||||
      }
 | 
			
		||||
      state.player.off(AudioPlayerStatus.Idle, state.onEnd);
 | 
			
		||||
      voiceStorage.delete(guild_id);
 | 
			
		||||
| 
						 | 
				
			
			@ -217,9 +217,9 @@ async function enqueue({
 | 
			
		|||
    try {
 | 
			
		||||
      info = await ytdl.getInfo(url, {});
 | 
			
		||||
    } catch (err) {
 | 
			
		||||
      await textChannel.createMessage(
 | 
			
		||||
        `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``
 | 
			
		||||
      );
 | 
			
		||||
      await textChannel.createMessage({
 | 
			
		||||
        content: `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``,
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    title = info?.videoDetails?.title;
 | 
			
		||||
| 
						 | 
				
			
			@ -261,9 +261,9 @@ async function enqueue({
 | 
			
		|||
    try {
 | 
			
		||||
      info = await ffprobe(url).then((obj) => obj.format);
 | 
			
		||||
    } catch (err) {
 | 
			
		||||
      textChannel.createMessage(
 | 
			
		||||
        `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``
 | 
			
		||||
      );
 | 
			
		||||
      textChannel.createMessage({
 | 
			
		||||
        content: `:warning: Failed to get metadata: \`\`\`\n${err}\n\`\`\``,
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    stream = !info.duration;
 | 
			
		||||
| 
						 | 
				
			
			@ -337,9 +337,9 @@ async function enqueue({
 | 
			
		|||
    }
 | 
			
		||||
  } else {
 | 
			
		||||
    if (!media) {
 | 
			
		||||
      textChannel.createMessage(
 | 
			
		||||
        `:warning: No usable media was found for \`${url}\`. May possibly be due to region restrictions or paywalls.`
 | 
			
		||||
      );
 | 
			
		||||
      textChannel.createMessage({
 | 
			
		||||
        content: `:warning: No usable media was found for \`${url}\`. May possibly be due to region restrictions or paywalls.`,
 | 
			
		||||
      });
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue