Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #77 from Butterstroke/development
Browse files Browse the repository at this point in the history
Release 1.6.1
  • Loading branch information
AurelicButter authored Jul 15, 2021
2 parents f00ae43 + 2ed92a2 commit 4af41e9
Show file tree
Hide file tree
Showing 13 changed files with 1,208 additions and 1,034 deletions.
290 changes: 135 additions & 155 deletions assets/speech/en-CA/music.js
Original file line number Diff line number Diff line change
@@ -1,159 +1,139 @@
/*
/*
* Speech for all music commands
*/

module.exports = {
"join": {
"noConnect": [
":x: I do not have enough permissions to connect to your voice channel. I am missing the connect permission. (You may want to check if I can speak in that channel too :wink:)",
"Huh, looks like I do not have the permissions to connect to your voice channel. I'm currently missing the connect permission. (You should check if I can also speak in the channel too!)"
],
"noSpeak": [
"Wow. Invite me to play music for you, yet I can't speak in the channel. You are more heartless than my owner. Give me the channel permission to speak and then try again.",
"Yikes. I've been given the silent treatment. I can't speak in your channel! Please give me the permission to speak and then try again!"
],
"success": [ //Parameter 1: Voice channel name
"Now tuned into: -param1. Ready and awaiting orders!",
"Preparing the DJ station in -param1. Now ready for your requested songs!",
"-param1 is ready to receive your requested songs! All we need now is some music!"
]
},
"leave": [
"I have left -channel.",
"The party is now over in -channel.",
"Thanks for the fun! I've cleaned up and have left -channel.",
"And that's it for the fun in -channel! We should do that again some other time."
],
"nowplaying": {
"noQueue": [
"I don't have any songs to play, baka! Add some using -prefixqueueadd `Youtube URL`",
"The queue is as existant as your waifu right now. You should add some songs."
],
"notPlay": [
"Hmm... good question. None of the above. I am not playing anything right now!",
"There isn't any music playing right now.",
"But... it's silent. Nothing is playing!"
]
},
"pause": {
"paused": [
"BAKA! Your stream is already paused!",
"The stream is already paused, baka!"
],
"success": [
"⏸ The mix is now paused.",
"Poof! Just like that, your tunes are paused! ⏸"
]
},
"play": {
"alreadyPlay": [
"I'm already playing in your channel, baka!",
"Can't you tell I'm playing music for you..."
], //Already playing
"noQueue": [
"Add some songs to the mix first with -prefixqueueadd [Youtube URL]",
"Whoops! You forgot to add some songs to the queue!",
"BAKA! There is no music in your queue!"
], //Nothing to play
"allDone": [
"Looks like my job is done. Add more songs or kick me out of the channel. It doesn't matter to me, baka.",
"Job's done! Time to add more songs or kick me out."
], //No more to play
"nextSong": [ //Parameter 1: Requester, Parameter 2: Song title
"📻 Playing -param1's request: **-param2**",
"📻 Now listening to **-param2**, requested by -param1!"
] //Next song playing
},
"queue": {
"noList": [
"You don't have anything in your queue at the moment. Add some with the queueadd command.",
"There's nothing here. You should add some songs with queueadd!"
],
"highCount": [
"I can't show you that page for its page number is greater than my queue pages. There are currently -pgs",
"Your number is higher than -pgs. So, there is nothing to see there."
]
},
"queueadd": {
"noURL": [
"You must provide me with a valid Youtube URL, BAKA!",
"What is this? This is not a URL I requested!",
"Wha- This isn't a Youtube URL! BAKA!"
],
"listDetect": [
"Looks like you want a playlist. Hold tight, this may take awhile."
],
"errCatch": [ //Parameter 1: Youtube ID
"Whoops! Looks like I can't access this video. <https://youtu.be/-param1>"
],
"success": [ //Parameter 1: Song title
"🎵 Added **-param1** to the queue 🎶",
"🎧 **-param1** has been added to the queue"
],
"multi": [ //Parameter 1: Number of songs
"🎵 Added **-param1** songs to the queue 🎶",
"I've finished adding **-param1** songs to the queue. Time for a break."
]
},
"remove": [
"**-song** has been removed from the queue.",
"Okay! **-song** has been removed from the queue."
],
"resume": {
"noPause": [
"The stream isn't paused at the moment.",
"Huh? I'm playing music right now."
],
"success": [
"▶ Now resuming your tunes. Keep partying!",
"Time to start partying again! I've resumed your tunes."
]
},
"skip": [
"⏭ Skipped the current song.",
"On to the next song! ⏭",
"⏭ Okay! Playing the next song then!"
],
"volume": {
"noArgs": [
"📢 Volume: -vol%",
"Currently playing at -vol%"
],
"zero": [
"You might as well mute me if you don't want any noise."
],
"overHun": [
"100% is the max. You just can't have 110%.."
],
"notPlay": [
"Kind of hard to adjust the volume if I am not playing music."
],
"success": [ //Parameter 1: Action, Parameter 2: volume
"-param1 the volume! Volume: -param2%",
"-param1 the volume to -param2% as requested!"
]
},
"general": {
"userVC": [
"You need to be in a voice channel first, BAKA!",
"You aren't even in a voice channel! Don't leave me all alone in a voice channel!",
"BAKA! You aren't even in a voice channel to begin with! Enter in my voice channel and tell me face to face!"
], //User not in VC
"noQueue": [
"I'm not even in a voice channel, baka!",
"I need to be playing music before we do any of that!",
"It looks like I'm not in a voice channel to begin with...",
"How can I be playing music when I am not in a voice channel, baka!"
], //Margarine not in a VC
"mismatch": [
"You are not connected in my voice channel, baka!",
"BAKA! You aren't even in my voice channel to begin with!",
"You are not in my voice channel! Come in and tell me face to face!",
"I'm already playing in another VC. You should join in on the fun instead!"
], //Margarine not in the same VC
"noHandler": [ //Margarine needs a dispatcher active in order to do the command
"Hey! I'm not playing anything right now!",
"You should really play some music before you try to interact with the music."
]
}
};
join: {
noConnect: [
":x: I do not have enough permissions to connect to your voice channel. I am missing the connect permission. (You may want to check if I can speak in that channel too :wink:)",
"Huh, looks like I do not have the permissions to connect to your voice channel. I'm currently missing the connect permission. (You should check if I can also speak in the channel too!)"
],
noSpeak: [
"Wow. Invite me to play music for you, yet I can't speak in the channel. You are more heartless than my owner. Give me the channel permission to speak and then try again.",
"Yikes. I've been given the silent treatment. I can't speak in your channel! Please give me the permission to speak and then try again!"
],
success: [
//Parameter 1: Voice channel name
"Now tuned into: -param1. Ready and awaiting orders!",
"Preparing the DJ station in -param1. Now ready for your requested songs!",
"-param1 is ready to receive your requested songs! All we need now is some music!"
]
},
leave: [
"I have left -channel.",
"The party is now over in -channel.",
"Thanks for the fun! I've cleaned up and have left -channel.",
"And that's it for the fun in -channel! We should do that again some other time."
],
nowplaying: {
noQueue: [
"I don't have any songs to play, baka! Add some using -prefixqueueadd `Youtube URL`",
"The queue is as existant as your waifu right now. You should add some songs."
],
notPlay: [
"Hmm... good question. None of the above. I am not playing anything right now!",
"There isn't any music playing right now.",
"But... it's silent. Nothing is playing!"
]
},
pause: {
paused: ["BAKA! Your stream is already paused!", "The stream is already paused, baka!"],
success: ["⏸ The mix is now paused.", "Poof! Just like that, your tunes are paused! ⏸"]
},
play: {
alreadyPlay: ["I'm already playing in your channel, baka!", "Can't you tell I'm playing music for you..."], //Already playing
noQueue: [
"Add some songs to the mix first with -prefixqueueadd [Youtube URL]",
"Whoops! You forgot to add some songs to the queue!",
"BAKA! There is no music in your queue!"
], //Nothing to play
allDone: [
"Looks like my job is done. Add more songs or kick me out of the channel. It doesn't matter to me, baka.",
"Job's done! Time to add more songs or kick me out."
], //No more to play
nextSong: [
//Parameter 1: Requester, Parameter 2: Song title
"📻 Playing -param1's request: **-param2**",
"📻 Now listening to **-param2**, requested by -param1!"
] //Next song playing
},
queue: {
noList: [
"You don't have anything in your queue at the moment. Add some with the queueadd command.",
"There's nothing here. You should add some songs with queueadd!"
],
highCount: [
"I can't show you that page for its page number is greater than my queue pages. There are currently -pgs",
"Your number is higher than -pgs. So, there is nothing to see there."
]
},
queueadd: {
noURL: [
"You must provide me with a valid Youtube URL, BAKA!",
"What is this? This is not a URL I requested!",
"Wha- This isn't a Youtube URL! BAKA!"
],
listDetect: ["Looks like you want a playlist. Hold tight, this may take awhile."],
errCatch: [
//Parameter 1: Youtube ID
"Whoops! Looks like I can't access this video. <https://youtu.be/-param1>"
],
success: [
//Parameter 1: Song title
"🎵 Added **-param1** to the queue 🎶",
"🎧 **-param1** has been added to the queue"
],
multi: [
//Parameter 1: Number of songs
"🎵 Added **-param1** songs to the queue 🎶",
"I've finished adding **-param1** songs to the queue. Time for a break."
]
},
remove: {
music: ["**-song** has been removed from the queue.", "Okay! **-song** has been removed from the queue."],
highIndex: [
"That index is too high! The current music list goes from 0 to -size.",
"Too high! The playlist only has -size songs in it!"
]
},
resume: {
noPause: ["The stream isn't paused at the moment.", "Huh? I'm playing music right now."],
success: ["▶ Now resuming your tunes. Keep partying!", "Time to start partying again! I've resumed your tunes."]
},
skip: ["⏭ Skipped the current song.", "On to the next song! ⏭", "⏭ Okay! Playing the next song then!"],
volume: {
noArgs: ["📢 Volume: -vol%", "Currently playing at -vol%"],
zero: ["You might as well mute me if you don't want any noise."],
overHun: ["100% is the max. You just can't have 110%.."],
notPlay: ["Kind of hard to adjust the volume if I am not playing music."],
success: [
//Parameter 1: Action, Parameter 2: volume
"-param1 the volume! Volume: -param2%",
"-param1 the volume to -param2% as requested!"
]
},
general: {
userVC: [
"You need to be in a voice channel first, BAKA!",
"You aren't even in a voice channel! Don't leave me all alone in a voice channel!",
"BAKA! You aren't even in a voice channel to begin with! Enter in my voice channel and tell me face to face!"
], //User not in VC
noQueue: [
"I'm not even in a voice channel, baka!",
"I need to be playing music before we do any of that!",
"It looks like I'm not in a voice channel to begin with...",
"How can I be playing music when I am not in a voice channel, baka!"
], //Margarine not in a VC
mismatch: [
"You are not connected in my voice channel, baka!",
"BAKA! You aren't even in my voice channel to begin with!",
"You are not in my voice channel! Come in and tell me face to face!",
"I'm already playing in another VC. You should join in on the fun instead!"
], //Margarine not in the same VC
noHandler: [
//Margarine needs a dispatcher active in order to do the command
"Hey! I'm not playing anything right now!",
"You should really play some music before you try to interact with the music."
]
}
};
64 changes: 36 additions & 28 deletions commands/Music/join.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
const { Command } = require("klasa");

module.exports = class extends Command {
constructor(...args) {
super(...args, {
name: "join",
runIn: ["text"],
description: "Joins the VC that you are in."
});
}
constructor(...args) {
super(...args, {
name: "join",
runIn: ["text"],
description: "Joins the VC that you are in."
});
}

async run(msg) {
var check = this.client.util.musicCheck(msg, "join");
if (check === false) { return; }

var vcID = msg.guild.channels.cache.get(msg.member.voice.channelID);
const permissions = vcID.permissionsFor(msg.guild.me);
if (permissions.has("CONNECT") === false) { return msg.sendLocale("JOIN_NOCONNECT", [msg]); }
if (permissions.has("SPEAK") === false) { return msg.sendLocale("JOIN_NOSPEAK", [msg]); }
async run(msg) {
let check = this.client.util.musicCheck(msg, "join");
if (check === false) {
return;
}

var vcSettings = {
channel: vcID,
queue: [],
volume: 100,
state: "STOP",
connection: null,
dispatcher: null
};
let vcID = msg.guild.channels.cache.get(msg.member.voice.channelID);
const permissions = vcID.permissionsFor(msg.guild.me);
if (permissions.has("CONNECT") === false) {
return msg.sendLocale("JOIN_NOCONNECT", [msg]);
}
if (permissions.has("SPEAK") === false) {
return msg.sendLocale("JOIN_NOSPEAK", [msg]);
}

vcID.join().then(connection => { vcSettings.connection = connection; });
this.client.music.set(msg.guild.id, vcSettings);
let vcSettings = {
channel: vcID,
queue: [],
volume: 100,
state: "STOP",
connection: null,
dispatcher: null
};

msg.sendLocale("JOIN_SUCCESS", [msg, vcID.name]);
}
};
vcID.join().then((connection) => {
vcSettings.connection = connection;
});
this.client.music.set(msg.guild.id, vcSettings);

msg.sendLocale("JOIN_SUCCESS", [msg, vcID.name]);
}
};
Loading

0 comments on commit 4af41e9

Please sign in to comment.