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 Canvas = require("canvas");
- const mysql = require("mysql");
- const isgd = require("isgd");
- const prefix = "#"
- var con = mysql.createConnection({
- host: "localhost",
- user: "root",
- password: "vJp1zb",
- database: "xrokz"
- });
- con.connect(e => {
- if(e) throw e;
- console.log("Shop - Connected to the database");
- });
- client.on('ready', () => {
- client.user.setActivity("#inv | ShopBot Beta");
- client.user.setStatus("dnd");
- });
- client.on('message', message => {
- if(message.content === prefix + "inv") {
- isgd.shorten(`https://discordapp.com/oauth2/authorize?client_id=${client.user.id}&permissions=470150224&scope=bot `, function(res) {
- message.author.send(`Invite me from:
- ${res}
- `);
- });
- }
- if(message.content === prefix + "help") {
- message.author.send(`
- ╭━━━╮╭╮╱╱╱╱╱╱╱╱╭━━╮╱╱╱╭╮
- ┃╭━╮┣╯╰╮╱╱╱╱╱╱╱┃╭╮┃╱╱╭╯╰╮
- ┃╰━━╋╮╭╋━━┳━┳━━┫╰╯╰┳━┻╮╭╯
- ╰━━╮┃┃┃┃╭╮┃╭┫┃━┫╭━╮┃╭╮┃┃
- ┃╰━╯┃┃╰┫╰╯┃┃┃┃━┫╰━╯┃╰╯┃╰╮
- ╰━━━╯╰━┻━━┻╯╰━━┻━━━┻━━┻━╯
- **StoreBot is very easy bot developed by @xRokz#0555**
- **Main Commands:**
- **${prefix}store** - sends a image includes every thing in server's store
- **${prefix}buy** - to buy a item
- **${prefix}new **- Create a new item (Adminstartor perm required)
- **${prefix}remove **- Remove an item from the store (ownership required)
- **${prefix}inv **- invite link for the bot
- **${prefix}support **- invite link for my support server
- **Support:**
- Not yet
- `);
- }
- });
- client.on("guildCreate", guild => {
- if(!guild.member(client.user).hasPermission("CHANGE_NICKNAME")) return;
- guild.member(client.user).setNickname(`${guild.name}'s shop`);
- });
- client.login("NDk3ODIwNzUxMDA5ODA4Mzk4.DpkwHg.E3GFCp5xklF0WWkPN_JshmU8Je4");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement