mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-23 00:23:17 +00:00
Update ready.js
This commit is contained in:
parent
fbb007e67a
commit
d096810907
@ -2,9 +2,13 @@ module.exports = {
|
|||||||
name: 'ready',
|
name: 'ready',
|
||||||
async execute(client, dbl) {
|
async execute(client, dbl) {
|
||||||
const remoteMusixGuildsData = await client.funcs.dbget('guilds', null, client);
|
const remoteMusixGuildsData = await client.funcs.dbget('guilds', null, client);
|
||||||
|
const remoteMusixPlaylistsData = await client.funcs.dbget('playlists', null, client);
|
||||||
remoteMusixGuildsData.forEach(guildData => {
|
remoteMusixGuildsData.forEach(guildData => {
|
||||||
client.global.db.guilds[guildData.id] = guildData.d;
|
client.global.db.guilds[guildData.id] = guildData.d;
|
||||||
});
|
});
|
||||||
|
remoteMusixPlaylistsData.forEach(guildData => {
|
||||||
|
client.global.db.playlists[guildData.id] = guildData.d;
|
||||||
|
});
|
||||||
console.log('- DB Set -');
|
console.log('- DB Set -');
|
||||||
client.user.setActivity(`@musix help | 🎶`, { type: 'LISTENING' });
|
client.user.setActivity(`@musix help | 🎶`, { type: 'LISTENING' });
|
||||||
client.user.setStatus('dnd');
|
client.user.setStatus('dnd');
|
||||||
|
Loading…
Reference in New Issue
Block a user