Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js');
- const client = new Discord.Client();
- const fs = require('fs');
- var token = ('NTQ4MTMwODg4OTkxNTA2NDk0.D1A2iw.3X1Va_ghGQFjuDEegvZY9g0l-jA')
- client.on('ready', () => {
- console.log(`[-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-]
- » Le bot est à présent allumé!
- » Fait par Jus2Raisin
- » Version: 1.0.0
- [-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-]`);
- });
- const activities_list = [
- "https://discord.gg/8eJRcjZ",
- "RIP XXXTENTACION",
- "Make with ❤️",
- ]; // creates an arraylist containing phrases you want your bot to switch through.
- client.on('ready', () => {
- setInterval(() => {
- const index = Math.floor(Math.random() * (activities_list.length - 1) + 1); // generates a random number between 1 and the length of the activities array list (in this case 5).
- client.user.setActivity(activities_list[index],{
- type: "STREAMING",
- url: "https://www.twitch.tv/jus2raisintv__"});
- }, 3000); // Runs this every 10 seconds. 1000 = 1seconde
- });
- client.commands = new Discord.Collection();
- fs.readdir("./Commandes/",(error, f) => {
- if(error) console.log(error);
- let commandes = f.filter(f => f.split(".").pop() === "js");
- if(commandes.length <= 0) return console.log("Aucune commandes trouvées !")
- commandes.forEach((f) => {
- let commande = require(`./Commands/${f}`)
- console.log(`${f} commandes chargés !`);
- client.commandes.set(commande.help.name, commande);
- })
- });
- fs.readdir("./Events/", (error, f) => {
- if(error) console.log(error);
- console.log(`${f.length} events en chargement!`);
- f.forEach((f) => {
- const events = require(`./Events/${f}`)
- const event = f.split(".")[0];
- client.on(event, events.bind(null, client));
- });
- });
- //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=//
- client.login(token)
- //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement