diff --git a/config.js b/config.js index c002d34..6a57949 100644 --- a/config.js +++ b/config.js @@ -54,7 +54,7 @@ module.exports = { ENABLED: true, IDLE_TIME: 120, // Time in seconds before the bot disconnects from an idle voice channel MAX_SEARCH_RESULTS: 100, - DEFAULT_VOLUME: 50, // Default volume for the music player (0-100) + DEFAULT_VOLUME: 100, // Default volume for the music player (0-100) DEFAULT_SOURCE: "ytsearch", // ytsearch = Youtube, ytmsearch = Youtube Music, spsearch = Spotify, scsearch = SoundCloud // Lavalink Websocket configuration LAVALINK_WS: { diff --git a/src/commands/music/lyric.js b/src/commands/music/lyric.js index f0bf0c5..ae1274c 100644 --- a/src/commands/music/lyric.js +++ b/src/commands/music/lyric.js @@ -1,4 +1,3 @@ -//@ts-check const { EmbedBuilder, ApplicationCommandOptionType } = require("discord.js"); const { MESSAGES, EMBED_COLORS } = require("@root/config"); @@ -94,7 +93,7 @@ function createLyricsEmbed(lyrics, member) { .setColor(EMBED_COLORS.BOT_EMBED) .setTitle(`${track.author} - ${track.title}`) .setThumbnail(track.albumArt[0].url) - .setFooter({ text: `Requested by: ${member} | Source: ${lyrics.source || 'Unknown'}` }); + .setFooter({ text: `Requested by: ${member.user.displayName} | Source: ${lyrics.source || 'Unknown'}` }); const ltext = lyrics.type === 'text' ? lyrics.text : lyrics.lines.map(v => v.line).join('\n') embed.setDescription(ltext.length > 4096 ? ltext.slice(0, 4093) + "..." : ltext); diff --git a/src/commands/music/play.js b/src/commands/music/play.js index fb875e0..176b88d 100644 --- a/src/commands/music/play.js +++ b/src/commands/music/play.js @@ -117,7 +117,7 @@ async function play({ member, guild, channel }, query) { .setAuthor({ name: "Added Track to queue" }) .setDescription(`[${track.info.title}](${track.info.uri})`) .setThumbnail(track.info.artworkUrl) - .setFooter({ text: `Requested By: ${member.user.username}` }); + .setFooter({ text: `Requested By: ${member.user.displayName}` }); fields.push({ name: "Song Duration", @@ -156,7 +156,7 @@ async function play({ member, guild, channel }, query) { inline: true, } ) - .setFooter({ text: `Requested By: ${member.user.username}` }); + .setFooter({ text: `Requested By: ${member.user.displayName}` }); } // create a player and/or join the member's vc diff --git a/src/commands/music/search.js b/src/commands/music/search.js index 1dc9102..47d8f8a 100644 --- a/src/commands/music/search.js +++ b/src/commands/music/search.js @@ -95,7 +95,7 @@ async function search({ member, guild, channel }, query) { embed .setAuthor({ name: "Added Song to queue" }) .setDescription(`[${track.info.title}](${track.info.uri})`) - .setFooter({ text: `Requested By: ${member.user.username}` }); + .setFooter({ text: `Requested By: ${member.user.displayName}` }); fields.push({ name: "Song Duration", @@ -136,7 +136,7 @@ async function search({ member, guild, channel }, query) { inline: true, } ) - .setFooter({ text: `Requested By: ${member.user.username}` }); + .setFooter({ text: `Requested By: ${member.user.displayName}` }); break; case "search": { @@ -189,7 +189,7 @@ async function search({ member, guild, channel }, query) { tracks = toAdd; embed .setDescription(`🎶 Added ${toAdd.length} songs to queue`) - .setFooter({ text: `Requested By: ${member.user.username}` }); + .setFooter({ text: `Requested By: ${member.user.displayName}` }); } } catch (err) { console.log(err); diff --git a/src/commands/utility/nodes.js b/src/commands/utility/nodes.js index 16ce05e..fac688c 100644 --- a/src/commands/utility/nodes.js +++ b/src/commands/utility/nodes.js @@ -70,10 +70,14 @@ async function fetchNodesAndTurnItToTable(nodes) { }) } -function fetchNodeStat(node, connTimeout = 5000) { +async function fetchNodeStat(node, connTimeout = 5000) { + const baseUrl = (node.info.port !== 80 && node.info.secure) + ? `https://${node.info.host}:${node.info.port}` + : `http://${node.info.host}:${node.info.port}`; + return HttpUtil.fetchWithConnTimeout( - `http://${node.info.host}/v4/stats`, + `${baseUrl}/v4/stats`, { headers: { Authorization: node.info.auth } }, connTimeout - ) + ); }