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.
- Loading branch information
1 parent
7516184
commit 0906fbd
Showing
13 changed files
with
134 additions
and
65 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { MessageEmbed } = require("discord.js"); | ||
const SlashCommand = require("../../lib/SlashCommand"); | ||
|
||
const command = new SlashCommand() | ||
.setName("247") | ||
.setDescription("toggles 24/7") | ||
.setRun(async (client, interaction, options) => { | ||
const player = interaction.client.manager.players.get(interaction.guild.id); | ||
if (!player) { | ||
return interaction.reply({ | ||
embeds: [client.ErrorEmbed("There's nothing to play 24/7!")], | ||
}); | ||
} else if (player.twentyFourSeven) { | ||
player.twentyFourSeven = false; | ||
const embed = client.Embed(`24/7 mode is now off.`); | ||
return interaction.reply({ embeds: [embed] }); | ||
} else { | ||
player.twentyFourSeven = true; | ||
const embed = client.Embed(`24/7 mode is now on.`); | ||
return interaction.reply({ embeds: [embed] }); | ||
} | ||
}); | ||
module.exports = command; | ||
// check above message, it is a little bit confusing. and erros are not handled. probably should be fixed. | ||
// ok use catch ez kom follow meh ;_; | ||
// the above message meaning error, if it cant find it or take too long the bot crashed | ||
// play commanddddd, if timeout or takes 1000 years to find song it crashed | ||
// OKIE, leave the comment here for idk |
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,21 @@ | ||
const SlashCommand = require("../../lib/SlashCommand"); | ||
|
||
const command = new SlashCommand() | ||
.setName("loop") | ||
.setDescription("Loop the current song") | ||
.setRun(async (client, interaction, options) => { | ||
let player = client.manager.players.get(interaction.guild.id); | ||
if (!player) { | ||
return interaction.reply({ | ||
embeds: [client.ErrorEmbed("There's nothing to be looped!")], | ||
}); | ||
} | ||
if (!player.loop(false)) player.loop(true); | ||
else if (!player.loop(true)) player.loop(false); | ||
|
||
interaction.reply({ | ||
embeds: [client.Embed(`Loop has been set to ${player.loop}`)], | ||
}); | ||
}); | ||
|
||
module.exports = command; |
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
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,6 +1,6 @@ | ||
const DiscordMusicBot = require("./lib/DiscordMusicBot"); | ||
const client = new DiscordMusicBot(); | ||
|
||
// Make sure your config.js is filled out | ||
console.log("Make sure to fill in the config.js before starting the bot."); | ||
|
||
module.exports = client; |
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
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