Advertisement
firyphoenix

index.js

Apr 12th, 2023
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. const { Client, Collection, GatewayIntentBits } = require('discord.js');
  2. require('dotenv/config');
  3. const fs = require('fs');
  4.  
  5. const client = new Client({ intents: 32767});
  6. client.commands = new Collection();
  7. client.commandArray = [];
  8.  
  9. const functionFolders = fs.readdirSync('./functions');
  10. for (const folder of functionFolders) {
  11. const functionFiles = fs
  12. .readdirSync('./functions${folder}')
  13. .filter((file) => file.endswith(".js"));
  14. for (const file of functionFiles) require('./funtions/${folder}/${file')(client);
  15. }
  16.  
  17. client.on('ready', () => {
  18. console.log('Firy.exe is back on')
  19. })
  20.  
  21. client.on('messageCreate', message => {
  22. if (message.content === 'Firy.exe') {
  23. message.reply('Thats certainly my name!')
  24. }
  25. })
  26.  
  27. client.login(process.env.Token)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement