nyx/events/ready.js

18 lines
526 B
JavaScript
Raw Normal View History

const client = require("..");
2021-06-12 12:53:51 +02:00
const version = require("../package.json").version;
2021-09-21 01:51:56 +02:00
const starboardClient = require("../client/StarboardClient");
const g = require("../models/guilds");
2021-07-13 05:17:39 +02:00
client.on("ready", async () => {
client.manager.init(client.user.id);
2021-09-21 01:51:56 +02:00
const data = await g.find();
starboardClient.config.guilds.set(
data.map(x => {
return {
id: x.Guild,
options: { starCount: x.StarCount, starboardChannel: x.Starboard },
};
})
);
2022-01-08 03:06:55 +01:00
console.log(`${client.user.username}`);
2021-06-12 12:53:51 +02:00
});