mrmBot-Matrix/events/guildCreate.js

10 lines
325 B
JavaScript
Raw Normal View History

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
export default async (client, guild) => {
log(`[GUILD JOIN] ${guild.name} (${guild.id}) added the bot.`);
const guildDB = await db.getGuild(guild.id);
if (!guildDB) await db.addGuild(guild.id);
2019-09-13 20:02:41 +00:00
};