1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-17 10:46:01 +00:00
This commit is contained in:
MatteZ02
2020-04-20 19:56:23 +03:00
parent 2d55a3a8da
commit a6e3e8b0de
71 changed files with 158 additions and 164 deletions

View File

@ -1,3 +1,5 @@
const { db } = require("../../../index-.js");
module.exports = {
name: "message",
async execute(client, msg, Discord) {
@ -6,9 +8,9 @@ module.exports = {
const args = msg.content.split(" ");
if (!args[1] || !args[2])
return msg.channel.send(client.messages.setKeyUsage);
if (!client.guilds.cache.get(args[2]))
return msg.channel.send(client.messages.invalidGuild);
client.global.db.guilds[args[2]].spotify_access_key = args[1];
client.config.db.collection("guilds").doc(args[2]).set({
key: args[1],
});
return msg.channel.send(client.messages.keySet);
}
if (!msg.guild) return;