Skip to content

Commit

Permalink
Development (#187)
Browse files Browse the repository at this point in the history
* Development (#183)

* 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]>

* Development  (#186)

* 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

* Fix 'Searching' has already been declared

* Development (#183) (#184)

* 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]>

* Update play.js (#185)

When the bot is kicked out of the room while the song is playing, the play command did not bring the bot into the room, it only adds the song added with the play command to the queue and the bot did not come to the room.
(When the bot is thrown with the change made, it will be able to come to the room with the play command)

* Slash command fixes

* edits

* Update grab.js

* Update loop.js

Co-authored-by: Sudhan <[email protected]>
Co-authored-by: ColonelOU <[email protected]>
Co-authored-by: A cute Blob <[email protected]>
Co-authored-by: yekaranfil <[email protected]>

Co-authored-by: Joseph <[email protected]>
Co-authored-by: A cute Blob <[email protected]>
Co-authored-by: ColonelOU <[email protected]>
Co-authored-by: yekaranfil <[email protected]>
  • Loading branch information
5 people authored May 6, 2021
1 parent 89ba03b commit 7a259c6
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions commands/bassboost.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ module.exports = {

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 (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
//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 (!args[0]) return client.sendTime(message.channel, "**Please provide a bassboost level. \nAvailable Levels:** `none`, `low`, `medium`, `high`"); //if the user do not provide args [arguments]

Expand Down
14 changes: 8 additions & 6 deletions commands/grab.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
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 use this command!**");
message.author.send(new MessageEmbed()
.setAuthor(`Saved Song:`, client.user.displayAvatarURL({
dynamic: true
Expand All @@ -40,7 +41,7 @@ run: async (client, message, args, { GuildDB }) => {
return message.channel.send("**:x: Your Dm's are disabled**")
})

message.react("✅").catch(e=>console.log("Could not react"))
client.sendTime(message.channel, "✅ | **Check your DMs!**")
},
SlashCommand: {
/**
Expand All @@ -51,11 +52,12 @@ run: async (client, message, args, { GuildDB }) => {
* @param {*} param3
*/
run: async (client, interaction, args, { GuildDB }) => {
const user = client.users.cache.get(interaction.member.user.id);
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())
.setAuthor(`Saved Song: `, client.user.displayAvatarURL())
.setThumbnail(`https://img.youtube.com/vi/${player.queue.current.identifier}/mqdefault.jpg`)
.setURL(player.queue.current.uri)
.setColor("RANDOM")
Expand All @@ -66,15 +68,15 @@ run: async (client, message, args, { GuildDB }) => {
.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({
.setFooter(`Requested by: ${player.queue.current.requester.tag}`, player.queue.current.requester.displayAvatarURL({
dynamic: true
}))
interaction.send(embed);
user.send(embed);
}catch(e) {
return client.sendTime(interaction, "**:x: Your DM's are disabled**")
return client.sendTime(interaction, "**:x: Your DMs are disabled**")
}

interaction.react("✅").catch(e => console.log("Could not react"))
client.sendTime(interaction, "✅ | **Check your DMs!**")
},
},
};
6 changes: 3 additions & 3 deletions commands/loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
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!**");
if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
//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.trackRepeat) {
Expand All @@ -45,8 +45,8 @@ module.exports = {
const voiceChannel = member.voice.channel;
let player = await client.Manager.get(interaction.guild_id);
if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**");
if (!member.voice.channel) return interaction.send("❌ | You must be on a voice channel.");
if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return interaction.send(`❌ | You must be on ${guild.me.voice.channel} to use this command.`);
if (!member.voice.channel) return interaction.send("❌ | **You must be in a voice channel to use this command!**");
if (guild.me.voice.channel && !guild.me.voice.channel.equals(voiceChannel)) return interaction.send(`❌ | You must be in ${guild.me.voice.channel} to use this command.`);

if(player.trackRepeat){
player.setTrackRepeat(false)
Expand Down
2 changes: 1 addition & 1 deletion commands/loopqueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
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!**");
if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
//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) {
Expand Down
2 changes: 1 addition & 1 deletion commands/pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
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!**");
if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
//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.paused) return client.sendTime(message.channel, "❌ | **Music is already paused!**");
player.pause(true);
Expand Down
2 changes: 1 addition & 1 deletion commands/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { TrackUtils } = require("erela.js");
let player = await client.Manager.players.get(message.guild.id);
const song = player.queue.slice(args[0] - 1, 1);
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!**");
if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
//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.queue || !player.queue.length || player.queue.length === 0)
Expand Down
2 changes: 1 addition & 1 deletion commands/resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
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!**");
if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
//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.playing) return message.channel.send("Music is already resumed!");
Expand Down
1 change: 1 addition & 0 deletions commands/seek.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
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 use this command!**");
if (!player.queue.current.isSeekable) return message.channel.send("This song is not able to seek from.");
let SeekTo = client.ParseHumanTime(args.join(" "));
if (!SeekTo) return message.channel.send("Please enter a time to seek!");
Expand Down
1 change: 1 addition & 0 deletions commands/shuffle.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
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 use this command!**");

if (!player.queue || !player.queue.length || player.queue.length === 0) return message.channel.send("Not enough songs in the queue to shuffle!");
player.queue.shuffle();
Expand Down
1 change: 1 addition & 0 deletions commands/skip.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
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 use this command!**");
player.stop();
await message.react("✅");
},
Expand Down
2 changes: 1 addition & 1 deletion commands/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
});

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!**");
if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
//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.**`);

try {
Expand Down
1 change: 1 addition & 0 deletions commands/volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
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 use this command!**");
if (!parseInt(args[0])) return message.channel.send("Please choose between 1 - 100");
let vol = parseInt(args[0]);
player.setVolume(vol);
Expand Down

0 comments on commit 7a259c6

Please sign in to comment.