-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update index.js (#178) * Handle error LavaLink not connect (#180) * Delete .replit * Handle error node not connect .. * Handle error lavalink not connect * Create .replit * Master branch to development (#171) * Latest commits to fix stuff (#169) * 24/7 Stay in vc stuff * edits and fixes (#168) Co-authored-by: Joseph <[email protected]> * ;-; (#170) * 24/7 Stay in vc stuff * edits and fixes (#168) * add: YouTube Tutorial at readme Co-authored-by: Joseph <[email protected]> Co-authored-by: Joseph <[email protected]> * edits and some fixes, but not all * split loop and loopqueue to make it simpler * Fixed single Spotify track "no matches" error * Small edits Co-authored-by: A cute Blob <[email protected]> Co-authored-by: ColonelOU <[email protected]> Co-authored-by: Sudhan <[email protected]> Co-authored-by: Joseph <[email protected]> Co-authored-by: A cute Blob <[email protected]> Co-authored-by: ColonelOU <[email protected]>
- Loading branch information
1 parent
e0710ad
commit 2623e3d
Showing
16 changed files
with
219 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const prettyMilliseconds = require("pretty-ms"); | ||
|
||
module.exports = { | ||
name: "grab", | ||
description: "Saves the current playing song to your Direct Messages", | ||
usage: "", | ||
permissions: { | ||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], | ||
member: [], | ||
}, | ||
aliases: ["save"], | ||
/** | ||
* | ||
* @param {import("../structures/DiscordMusicBot")} client | ||
* @param {import("discord.js").Message} message | ||
* @param {string[]} args | ||
* @param {*} param3 | ||
*/ | ||
run: async (client, message, args, { GuildDB }) => { | ||
let player = await client.Manager.get(message.guild.id); | ||
if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); | ||
message.author.send(new MessageEmbed() | ||
.setAuthor(`Saved Song:`, client.user.displayAvatarURL({ | ||
dynamic: true | ||
})) | ||
.setThumbnail(`https://img.youtube.com/vi/${player.queue.current.identifier}/mqdefault.jpg`) | ||
.setURL(player.queue.current.uri) | ||
.setColor("RANDOM") | ||
.setTitle(`**${player.queue.current.title}**`) | ||
.addField(`⌛ Duration: `, `\`${prettyMilliseconds(player.queue.current.duration, {colonNotation: true})}\``, true) | ||
.addField(`🎵 Author: `, `\`${player.queue.current.author}\``, true) | ||
.addField(`▶ Play it:`, `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix | ||
}play ${player.queue.current.uri}\``) | ||
.addField(`🔎 Saved in:`, `<#${message.channel.id}>`) | ||
.setFooter(`Requested by: ${player.queue.current.requester.tag} | Guild: ${message.guild.name}`, player.queue.current.requester.displayAvatarURL({ | ||
dynamic: true | ||
})) | ||
).catch(e=>{ | ||
return message.channel.send("**:x: Your Dm's are disabled**") | ||
}) | ||
|
||
message.react("✅").catch(e=>console.log("Could not react")) | ||
}, | ||
SlashCommand: { | ||
/** | ||
* | ||
* @param {import("../structures/DiscordMusicBot")} client | ||
* @param {import("discord.js").Message} message | ||
* @param {string[]} args | ||
* @param {*} param3 | ||
*/ | ||
run: async (client, interaction, args, { GuildDB }) => { | ||
let player = await client.Manager.get(interaction.guild_id); | ||
if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**"); | ||
try{ | ||
let embed = new MessageEmbed() | ||
.setAuthor(`Saved from `, interaction.guild.name, client.user.displayAvatarURL()) | ||
.setThumbnail(`https://img.youtube.com/vi/${player.queue.current.identifier}/mqdefault.jpg`) | ||
.setURL(player.queue.current.uri) | ||
.setColor("RANDOM") | ||
.setTimestamp() | ||
.setTitle(`**${player.queue.current.title}**`) | ||
.addField(`⌛ Duration: `, `\`${prettyMilliseconds(player.queue.current.duration, {colonNotation: true})}\``, true) | ||
.addField(`🎵 Author: `, `\`${player.queue.current.author}\``, true) | ||
.addField(`▶ Play it:`, `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix | ||
}play ${player.queue.current.uri}\``) | ||
.addField(`🔎 Saved in:`, `<#${interaction.channel_id}>`) | ||
.setFooter(`Requested by: ${player.queue.current.requester.tag} | Guild: ${interaction.guild.name}`, player.queue.current.requester.displayAvatarURL({ | ||
dynamic: true | ||
})) | ||
interaction.send(embed); | ||
}catch(e) { | ||
return client.sendTime(interaction, "**:x: Your DM's are disabled**") | ||
} | ||
|
||
interaction.react("✅").catch(e => console.log("Could not react")) | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const { TrackUtils } = require("erela.js"); | ||
|
||
module.exports = { | ||
name: "loopqueue", | ||
description: "Loop the whole queue", | ||
usage: "", | ||
permissions: { | ||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], | ||
member: [], | ||
}, | ||
aliases: ["lq", "repeatqueue", "rq"], | ||
/** | ||
* | ||
* @param {import("../structures/DiscordMusicBot")} client | ||
* @param {import("discord.js").Message} message | ||
* @param {string[]} args | ||
* @param {*} param3 | ||
*/ | ||
run: async (client, message, args, { GuildDB }) => { | ||
let player = await client.Manager.get(message.guild.id); | ||
if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**"); | ||
if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**"); | ||
//else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); | ||
|
||
if (player.QueueRepeat) { | ||
player.setQueueRepeat(false) | ||
client.sendTime(message.channel, `Queue loop \`disabled\``); | ||
} else { | ||
player.setQueueRepeat(true) | ||
client.sendTime(message.channel, `Queue loop \`enabled\``); | ||
} | ||
}, | ||
SlashCommand: { | ||
/** | ||
* | ||
* @param {import("../structures/DiscordMusicBot")} client | ||
* @param {import("discord.js").Message} message | ||
* @param {string[]} args | ||
* @param {*} param3 | ||
*/ | ||
run: async (client, interaction, args, { GuildDB }) => { | ||
let player = await client.Manager.get(interaction.guild_id); | ||
const guild = client.guilds.cache.get(interaction.guild_id); | ||
const member = guild.members.cache.get(interaction.member.user.id); | ||
const voiceChannel = member.voice.channel; | ||
let awaitchannel = client.channels.cache.get(interaction.channel_id); /// thanks Reyansh for this idea ;-; | ||
if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**"); | ||
if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**"); | ||
if (guild.me.voice.channel && !guild.me.voice.channel.equals(voiceChannel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); | ||
|
||
if(player.queueRepeat){ | ||
player.setQueueRepeat(false) | ||
client.sendTime(interaction, `Queue loop \`disabled\``); | ||
}else{ | ||
player.setQueueRepeat(true) | ||
client.sendTime(interaction, `Queue loop \`enabled\``); | ||
} | ||
console.log(interaction.data) | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.