mirror of https://github.com/kry008/Bot-2.0.git
				
				
				
			repair join fn
							parent
							
								
									5cf02ec75f
								
							
						
					
					
						commit
						ca4e901219
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue