2021-08-19 14:19:14 +00:00
|
|
|
import db from "../utils/database.js";
|
|
|
|
import { log } from "../utils/logger.js";
|
2019-09-13 20:02:41 +00:00
|
|
|
|
|
|
|
// run when the bot is added to a guild
|
2022-09-21 05:05:03 +00:00
|
|
|
export default async (client, guild) => {
|
2021-08-19 14:19:14 +00:00
|
|
|
log(`[GUILD JOIN] ${guild.name} (${guild.id}) added the bot.`);
|
2021-08-13 03:28:09 +00:00
|
|
|
const guildDB = await db.getGuild(guild.id);
|
2022-09-29 04:11:05 +00:00
|
|
|
if (!guildDB) await db.addGuild(guild.id);
|
2019-09-13 20:02:41 +00:00
|
|
|
};
|