Advertisement
Guest User

Untitled

a guest
Oct 6th, 2018
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. const Discord = require("discord.js");
  2. const client = new Discord.Client()
  3. const Canvas = require("canvas");
  4. const mysql = require("mysql");
  5. const isgd = require("isgd");
  6. const prefix = "#"
  7. var con = mysql.createConnection({
  8. host: "localhost",
  9. user: "root",
  10. password: "vJp1zb",
  11. database: "xrokz"
  12. });
  13.  
  14. con.connect(e => {
  15. if(e) throw e;
  16. console.log("Shop - Connected to the database");
  17. });
  18.  
  19. client.on('ready', () => {
  20. client.user.setActivity("#inv | ShopBot Beta");
  21. client.user.setStatus("dnd");
  22. });
  23.  
  24. client.on('message', message => {
  25. if(message.content === prefix + "inv") {
  26. isgd.shorten(`https://discordapp.com/oauth2/authorize?client_id=${client.user.id}&permissions=470150224&scope=bot `, function(res) {
  27. message.author.send(`Invite me from:
  28. ${res}
  29. `);
  30. });
  31. }
  32. if(message.content === prefix + "help") {
  33. message.author.send(`
  34.  
  35. ╭━━━╮╭╮╱╱╱╱╱╱╱╱╭━━╮╱╱╱╭╮
  36. ┃╭━╮┣╯╰╮╱╱╱╱╱╱╱┃╭╮┃╱╱╭╯╰╮
  37. ┃╰━━╋╮╭╋━━┳━┳━━┫╰╯╰┳━┻╮╭╯
  38. ╰━━╮┃┃┃┃╭╮┃╭┫┃━┫╭━╮┃╭╮┃┃
  39. ┃╰━╯┃┃╰┫╰╯┃┃┃┃━┫╰━╯┃╰╯┃╰╮
  40. ╰━━━╯╰━┻━━┻╯╰━━┻━━━┻━━┻━╯
  41.  
  42.  
  43. **StoreBot is very easy bot developed by @xRokz#0555**
  44.  
  45. **Main Commands:**
  46. **${prefix}store** - sends a image includes every thing in server's store
  47. **${prefix}buy** - to buy a item
  48. **${prefix}new **- Create a new item (Adminstartor perm required)
  49. **${prefix}remove **- Remove an item from the store (ownership required)
  50. **${prefix}inv **- invite link for the bot
  51. **${prefix}support **- invite link for my support server
  52.  
  53. **Support:**
  54. Not yet
  55. `);
  56. }
  57. });
  58.  
  59. client.on("guildCreate", guild => {
  60. if(!guild.member(client.user).hasPermission("CHANGE_NICKNAME")) return;
  61. guild.member(client.user).setNickname(`${guild.name}'s shop`);
  62. });
  63.  
  64.  
  65. client.login("NDk3ODIwNzUxMDA5ODA4Mzk4.DpkwHg.E3GFCp5xklF0WWkPN_JshmU8Je4");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement