repair join fn

main
kry008 2024-06-16 10:36:11 +02:00
parent 5cf02ec75f
commit ca4e901219
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
const { Events } = require('discord.js');
const fs = require('fs');
const { prefix } = require('../config.json');
module.exports = {
name: Events.GuildCreate,
@ -11,7 +12,7 @@ module.exports = {
fs.appendFileSync(guildPath, `JOIN: \`${guild.name}\` - ${guild.id} - ${new Date().toLocaleString()}\n`);
const guildPath2 = `./guilds/guilds-${guild.id}.json`;
if (!fs.existsSync(guildPath2)) {
fs.writeFileSync(guildPath2, JSON.stringify({ id: guild.id, name: [guild.name], premium: false, prefix: prefix, premium:false, prefix:"^", hello: false, goodbye: true, helloChannel: null, goodbyeChannel: null, rulesChannel: null, welcomeMessage: { title: "Say hello", content: "Hello {{USER}}"}, goodbyeMessage: { title: "Say goodbye", content: "Goodbye {{USER}}"}, rulesMessage: null}));
fs.writeFileSync(guildPath2, JSON.stringify({ id: guild.id, name: [guild.name], premium: false, prefix: prefix, premium:false, hello: false, goodbye: true, helloChannel: null, goodbyeChannel: null, rulesChannel: null, welcomeMessage: { title: "Say hello", content: "Hello {{USER}}"}, goodbyeMessage: { title: "Say goodbye", content: "Goodbye {{USER}}"}, rulesMessage: null}));
}
else
{