1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 03:33:17 +00:00

remove setkey

This commit is contained in:
MatteZ02 2020-04-21 22:19:40 +03:00
parent 32ae8cbb6e
commit e829eeaf8f
5 changed files with 72 additions and 98 deletions

View File

@ -42,8 +42,6 @@ module.exports = {
if (!voiceChannel.speakable)
return msg.channel.send(client.messages.noPermsSpeak);
if (url.match(/^https?:\/\/(open.spotify.com|spotify.com)(.*)$/)) {
if (!client.global.db.guilds[msg.guild.id].premium)
return msg.channel.send(client.messages.notPremium);
const playlistId = url.split("/playlist/")[1].split("?")[0];
spotify.getPlaylist(playlistId).then(
async function (data) {

View File

@ -48,11 +48,6 @@ module.exports = {
client.messages.settingsBassDesc,
true
)
.addField(
client.messages.settingsSetKey,
client.messages.settingsSetKeyDesc,
true
)
.setFooter(footer)
.setAuthor(client.user.username, client.user.displayAvatarURL)
.setColor(client.config.embedColor);

View File

@ -1,6 +0,0 @@
module.exports = {
name: "setkey",
async execute(msg, args, client) {
msg.channel.send(client.messages.setKeyUsage);
},
};

View File

@ -1,17 +1,7 @@
module.exports = {
name: "message",
async execute(client, msg, Discord) {
if (msg.author.bot) return;
if (!msg.guild && msg.content.startsWith("setkey")) {
const args = msg.content.split(" ");
if (!args[1] || !args[2])
return msg.channel.send(client.messages.setKeyUsage);
client.config.db.collection("guilds").doc(args[2]).set({
key: args[1],
});
return msg.channel.send(client.messages.keySet);
}
if (!msg.guild) return;
if (msg.author.bot || !msg.guild) return;
if (!client.global.db.guilds[msg.guild.id]) return;
let prefix = client.global.db.guilds[msg.guild.id].prefix;
const args = msg.content.slice(prefix.length).split(" ");

View File

@ -96,7 +96,7 @@ module.exports = {
noResults: emojis.redx + "I could not obtain any search results!",
noResultsLyrics: emojis.redx + "I could not obtain any results!",
noResultsSpotify: emojis.redx +
"I could not obtain any results! Make sure you have a key set! More info with the setkey setting.",
"I could not obtain any results!",
noServerQueue: emojis.redx + "There is nothing playing!",
noSongs: emojis.redx + "That song does not exist!",
notPremium: emojis.redx + "This is not a premium guild!",
@ -141,7 +141,6 @@ module.exports = {
seekingPointPositive: emojis.redx + "The seeking point needs to be a positive number!",
seekMax: emojis.redx +
"The lenght of this song is %LENGTH% seconds! You can't seek further than that!",
setKeyUsage: "Usage: `setkey <key> <guild id>`. Get your key from <https://developer.spotify.com/documentation/web-playback-sdk/quick-start/#> by pressing `Get your web playback sdk access token`.\nThe key will expire in 60 minutes!\nDO THIS COMMAND IN THE DMS! YOUR KEY IS PRIVATE DO NOT SHARE IT WITH ANYONE!",
settingsAnnounceSongs: "announcesongs",
settingsAnnounceSongsDesc: "Whether to announce songs that start playing or not.",
settingsBass: "bass",
@ -155,8 +154,6 @@ module.exports = {
settingsPrefixDesc: "Change the guild specific prefix. (string)",
settingsSetDj: "setdj",
settingsSetDjDesc: "Set a DJ role. This will allow chosen users to freely use all Musix commands. This will automatically set the `permissions` settings to true in order for the `DJ` role to have effect!",
settingsSetKey: "setkey",
settingsSetKeyDesc: "Get instructions on how to set a spotify key.",
settingsTitle: "Guild settings for Musix",
settingsVolume: "volume",
settingsVolumeDesc: "Change the default volume that the bot will start playing at. (number)",