forked from SudhanPlayz/Discord-MusicBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 24/7 Stay in vc stuff * edits and fixes (SudhanPlayz#168) * add: YouTube Tutorial at readme * Master branch to development (SudhanPlayz#171) * Latest commits to fix stuff (SudhanPlayz#169) * 24/7 Stay in vc stuff * edits and fixes (SudhanPlayz#168) Co-authored-by: Joseph <[email protected]> * ;-; (SudhanPlayz#170) * 24/7 Stay in vc stuff * edits and fixes (SudhanPlayz#168) * add: YouTube Tutorial at readme Co-authored-by: Joseph <[email protected]> Co-authored-by: Joseph <[email protected]> * temporarily removed line (SudhanPlayz#172) * edits and fixes * temporarily removed line Co-authored-by: Joseph <[email protected]>
- Loading branch information
1 parent
ed1d348
commit e770157
Showing
6 changed files
with
112 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const { TrackUtils } = require("erela.js"); | ||
|
||
module.exports = { | ||
name: "pause", | ||
description: "To pause the current song", | ||
usage: "", | ||
permissions: { | ||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], | ||
member: [], | ||
}, | ||
aliases: [], | ||
/** | ||
* | ||
* @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.paused) return message.channel.send("Music is already paused!"); | ||
player.pause(true); | ||
let embed = new MessageEmbed().setAuthor(`Paused!`, client.config.IconURL).setColor("RANDOM").setDescription(`Type \`${GuildDB.prefix}resume\` to play!`); | ||
await message.channel.send(embed); | ||
await message.react("✅"); | ||
}, | ||
|
||
SlashCommand: { | ||
/** | ||
* | ||
* @param {import("../structures/DiscordMusicBot")} client | ||
* @param {import("discord.js").Message} message | ||
* @param {string[]} args | ||
* @param {*} param3 | ||
*/ | ||
run: async (client, interaction, args, { GuildDB }) => { | ||
const guild = client.guilds.cache.get(interaction.guild_id); | ||
const member = guild.members.cache.get(interaction.member.user.id); | ||
|
||
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(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); | ||
|
||
let player = await client.Manager.get(interaction.guild_id); | ||
if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**"); | ||
if (player.paused) return client.sendTime(interaction, "Music is already paused!"); | ||
player.pause(true); | ||
client.sendTime(interaction, "**⏸ Paused!**"); | ||
}, | ||
}, | ||
}; | ||
const { MessageEmbed } = require("discord.js"); | ||
const { TrackUtils } = require("erela.js"); | ||
|
||
module.exports = { | ||
name: "pause", | ||
description: "To pause the current song", | ||
usage: "", | ||
permissions: { | ||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], | ||
member: [], | ||
}, | ||
aliases: [], | ||
/** | ||
* | ||
* @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.paused) return message.channel.send("Music is already paused!"); | ||
player.pause(true); | ||
let embed = new MessageEmbed().setAuthor(`Paused!`, client.config.IconURL).setColor("RANDOM").setDescription(`Type \`${GuildDB.prefix}resume\` to play!`); | ||
await message.channel.send(embed); | ||
await message.react("✅"); | ||
}, | ||
|
||
SlashCommand: { | ||
/** | ||
* | ||
* @param {import("../structures/DiscordMusicBot")} client | ||
* @param {import("discord.js").Message} message | ||
* @param {string[]} args | ||
* @param {*} param3 | ||
*/ | ||
run: async (client, interaction, args, { GuildDB }) => { | ||
const guild = client.guilds.cache.get(interaction.guild_id); | ||
const member = guild.members.cache.get(interaction.member.user.id); | ||
|
||
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(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); | ||
|
||
let player = await client.Manager.get(interaction.guild_id); | ||
if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**"); | ||
if (player.paused) return client.sendTime(interaction, "Music is already paused!"); | ||
player.pause(true); | ||
client.sendTime(interaction, "**⏸ Paused!**"); | ||
}, | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,53 +1,53 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const { TrackUtils } = require("erela.js"); | ||
|
||
module.exports = { | ||
name: "resume", | ||
description: "To resume the current song", | ||
usage: "", | ||
permissions: { | ||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], | ||
member: [], | ||
}, | ||
aliases: [], | ||
/** | ||
* | ||
* @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.playing) return message.channel.send("Music is already resumed!"); | ||
player.pause(false); | ||
await message.react("✅"); | ||
}, | ||
|
||
SlashCommand: { | ||
/** | ||
* | ||
* @param {import("../structures/DiscordMusicBot")} client | ||
* @param {import("discord.js").Message} message | ||
* @param {string[]} args | ||
* @param {*} param3 | ||
*/ | ||
run: async (client, interaction, args, { GuildDB }) => { | ||
const guild = client.guilds.cache.get(interaction.guild_id); | ||
const member = guild.members.cache.get(interaction.member.user.id); | ||
|
||
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(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); | ||
|
||
let player = await client.Manager.get(interaction.guild_id); | ||
if (!player) return client.sendTime(inter, "❌ | **Nothing is playing right now...**"); | ||
if (player.playing) return client.sendTime(interaction, "Music is already resumed!"); | ||
player.pause(false); | ||
client.sendTime(interaction, "**⏯ Resumed!**"); | ||
}, | ||
}, | ||
}; | ||
const { MessageEmbed } = require("discord.js"); | ||
const { TrackUtils } = require("erela.js"); | ||
|
||
module.exports = { | ||
name: "resume", | ||
description: "To resume the current song", | ||
usage: "", | ||
permissions: { | ||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], | ||
member: [], | ||
}, | ||
aliases: [], | ||
/** | ||
* | ||
* @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.playing) return message.channel.send("Music is already resumed!"); | ||
player.pause(false); | ||
await message.react("✅"); | ||
}, | ||
|
||
SlashCommand: { | ||
/** | ||
* | ||
* @param {import("../structures/DiscordMusicBot")} client | ||
* @param {import("discord.js").Message} message | ||
* @param {string[]} args | ||
* @param {*} param3 | ||
*/ | ||
run: async (client, interaction, args, { GuildDB }) => { | ||
const guild = client.guilds.cache.get(interaction.guild_id); | ||
const member = guild.members.cache.get(interaction.member.user.id); | ||
|
||
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(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`); | ||
|
||
let player = await client.Manager.get(interaction.guild_id); | ||
if (!player) return client.sendTime(inter, "❌ | **Nothing is playing right now...**"); | ||
if (player.playing) return client.sendTime(interaction, "Music is already resumed!"); | ||
player.pause(false); | ||
client.sendTime(interaction, "**⏯ Resumed!**"); | ||
}, | ||
}, | ||
}; |
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