mirror of
				https://github.com/musix-org/musix-oss
				synced 2025-11-04 03:39:32 +00:00 
			
		
		
		
	if devmode no logs will be sent
This commit is contained in:
		
							
								
								
									
										2
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								index.js
									
									
									
									
									
								
							@@ -26,5 +26,5 @@ const oldConsole = {};
 | 
				
			|||||||
oldConsole.log = console.log;
 | 
					oldConsole.log = console.log;
 | 
				
			||||||
console.log = function (arg) {
 | 
					console.log = function (arg) {
 | 
				
			||||||
  oldConsole.log(arg);
 | 
					  oldConsole.log(arg);
 | 
				
			||||||
  webhookClient.send(arg);
 | 
					  if (!config.devMode) webhookClient.send(arg);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,5 +7,5 @@ const oldConsole = {};
 | 
				
			|||||||
oldConsole.log = console.log;
 | 
					oldConsole.log = console.log;
 | 
				
			||||||
console.log = function (arg) {
 | 
					console.log = function (arg) {
 | 
				
			||||||
  oldConsole.log(arg);
 | 
					  oldConsole.log(arg);
 | 
				
			||||||
  webhookClient.send(arg);
 | 
					  if (!client.config.devMode) webhookClient.send(arg);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,12 @@
 | 
				
			|||||||
module.exports = async function (guild, song, client, seek, play) {
 | 
					module.exports = async function (guild, song, client, seek, play) {
 | 
				
			||||||
  console.log("test");
 | 
					  const {
 | 
				
			||||||
  const { Readable: ReadableStream } = require("stream");
 | 
					    Readable: ReadableStream
 | 
				
			||||||
 | 
					  } = require("stream");
 | 
				
			||||||
  const Discord = require("discord.js");
 | 
					  const Discord = require("discord.js");
 | 
				
			||||||
  const ytdl = require("ytdl-core");
 | 
					  const ytdl = require("ytdl-core");
 | 
				
			||||||
  const { streamConfig } = require("../config/config.js");
 | 
					  const {
 | 
				
			||||||
 | 
					    streamConfig
 | 
				
			||||||
 | 
					  } = require("../config/config.js");
 | 
				
			||||||
  const prism = require("prism-media");
 | 
					  const prism = require("prism-media");
 | 
				
			||||||
  const queue = client.queue.get(guild.id);
 | 
					  const queue = client.queue.get(guild.id);
 | 
				
			||||||
  if (!song) {
 | 
					  if (!song) {
 | 
				
			||||||
@@ -26,8 +29,8 @@ module.exports = async function (guild, song, client, seek, play) {
 | 
				
			|||||||
  let input = song.url;
 | 
					  let input = song.url;
 | 
				
			||||||
  if (song.type === "ytdl")
 | 
					  if (song.type === "ytdl")
 | 
				
			||||||
    input = ytdl(song.url, streamConfig.ytdlOptions)
 | 
					    input = ytdl(song.url, streamConfig.ytdlOptions)
 | 
				
			||||||
      //.on('info', (info, format) => console.log(format))
 | 
					    //.on('info', (info, format) => console.log(format))
 | 
				
			||||||
      .on("error", (err) => console.log(err));
 | 
					    .on("error", (err) => console.log(err));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const ffmpegArgs = [
 | 
					  const ffmpegArgs = [
 | 
				
			||||||
    "-analyzeduration",
 | 
					    "-analyzeduration",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user