Flygoow

Untitled

Oct 14th, 2017
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. const Discord = require('discord.js');
  2. const path = require('path');
  3. const bot = new Discord.Client();
  4. const ddiff = require('return-deep-diff');
  5. const prefix = "*";
  6. const fs = require("fs");
  7.  
  8. var servers = {};
  9.  
  10. bot.commands = new Discord.Collection();
  11.  
  12. bot.on("error", (e) => console.error(e));
  13. bot.on("warn", (e) => console.warn(e));
  14. bot.on("debug", (e) => console.info(e));
  15.  
  16. bot.on('ready', function() {
  17. console.log("I'm Online https://discordapp.com/oauth2/authorize?client_id=368691171461038080&scope=bot&permissions=305527912")},
  18.  
  19. bot.on("message", function (message) {
  20. bot.on('ready', () => {
  21. message.channel.sendMessage("Hello, i'm a cool bot created by Flygoow. Type *help for more!")
  22. bot.user.setGame('*help')
  23. bot.user.setStatus("online")
  24. })},
  25.  
  26. bot.on("message", function (message) {
  27. if (message.author.equals(bot.user)) return;
  28. if (!message.content.startsWith(prefix)) return;
  29. if (message.content.startsWith(prefix)) {
  30. message.delete(100)
  31. }
  32.  
  33. var args = message.content.substring(prefix.length).split(" ");
  34.  
  35. switch (args[0]) {
  36. case "help":
  37. message.channel.sendMessage("I'm just online.")
  38. }
  39. }),
  40.  
  41. bot.login('no')))
Advertisement
Add Comment
Please, Sign In to add comment