mirror of
https://github.com/musix-org/musix-oss
synced 2026-10-16 17:24:15 +00:00
to js
This commit is contained in:
1 parent
2d55a3a8da
commit
a6e3e8b0de
71 files changed
+158
-164
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,7 @@
|
||||
const YouTube = require("simple-youtube-api");
|
||||
const search = require("yt-search");
|
||||
const SpotifyApi = require("spotify-web-api-node");
|
||||
const { globaldb } = require("../../index.js");
|
||||
|
||||
module.exports = {
|
||||
name: "play",
|
||||
@@ -16,9 +17,16 @@ module.exports = {
|
||||
secret: client.config.spotify_client_secret,
|
||||
});
|
||||
|
||||
spotify.setAccessToken(
|
||||
client.global.db.guilds[msg.guild.id].spotify_access_key
|
||||
);
|
||||
const dbdata = await globaldb
|
||||
.collection("guilds")
|
||||
.doc(msg.guild.id)
|
||||
.get()
|
||||
.catch((err) => {
|
||||
console.log("Error getting document", err);
|
||||
return "error";
|
||||
});
|
||||
const accessKey = dbdata.data();
|
||||
spotify.setAccessToken(accessKey);
|
||||
|
||||
const youtube = new YouTube(client.config.api_key);
|
||||
const searchString = args.slice(1).join(" ");
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
name: 'queue',
|
||||
alias: 'q',
|
||||
usage: '<page(opt)>',
|
||||
usage: '',
|
||||
description: 'See the queue.',
|
||||
onlyDev: false,
|
||||
permission: 'none',
|
||||
@@ -25,4 +25,4 @@ module.exports = {
|
||||
.setColor(client.config.embedColor)
|
||||
return msg.channel.send(embed);
|
||||
}
|
||||
};
|
||||
};
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user