Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Commando = require("discord.js-commando")
- const Discord = require("discord.js")
- const bot = new Commando.Client();
- const token = "my token goes gere";
- const botconfig = require("./botconfig.json");
- const economy = require("discord-eco")
- const dba = require('discord-dba');
- const fs = require("fs");
- const mysql = require('mysql');
- const express = require('express')
- const Client = require('fortnite')
- const fortnite = new Client("aaed04ee-dec9-4b32-bfce-0fca0cbf7f34");
- let prefix2 = '!';
- var app = express();
- var connection = mysql.createConnection({
- host: 'localhost',
- user: 'root',
- password: '',
- database: 'sampleDB'
- });
- let coins = require("./commands/economy/coins.json");
- bot.registry.registerGroup('simple', 'Simple');
- bot.registry.registerGroup('music', 'music');
- bot.registry.registerGroup('economy', 'economy');
- bot.registry.registerCommandsIn(__dirname + '/commands');
- bot.registry.registerDefaults();
- bot.on("message", function(message){
- let prefix = '!';
- if(message.content == "hello"){
- message.channel.sendMessage("Hello!" + message.author + ",how are you?")
- }
- if (message.content.startsWith("krabby patty")) {
- message.channel.send("PREPARING THE KRABBY PATTY!", {files: ["./images/patty.png"]});
- return;
- }
- if (message.content === "ping"){
- message.channel.send("Pong!");
- return;
- }
- if (message.content === "what do i look like") {
- message.channel.send(message.author.avatarURL);
- message.channel.send("Also UGLY As Fuck");
- return;
- }
- //Test Economy
- if (message.content === "payday") {
- economy.updateBalance(message.author.id, 500).then((i) => {
- message.channel.send(`**You got $500**\n**New Balance:** ${i.money}`);
- })
- }
- if (message.content === "balance") {
- economy.fetchBalance(message.author.id).then((i) => { // economy.fetchBalance grabs the userID, finds it, and puts it into 'i'.
- message.channel.send(`**Balance:** ${i.money}`);
- })
- }
- if (message.content === "payfine") {
- economy.updateBalance(message.author.id, -500).then((i) => { // Since the 'value' is -500, it will 'add' -500, making the balance $500 lower.
- message.channel.send(`**You paid your fine of $500!**\n**New Balance:** ${i.money}`);
- })
- }
- if (message.content === "meme")/*if you want to start with the prefix just do if (message.startsWith (prefix + "meme"))*/ {
- number = 302;
- imageNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
- message.channel.send ({files: ["./images/memes/" + imageNumber + ".png"]})
- }
- if (message.content === "SALbotinfo"){
- let bicon = bot.user.displayAvatarURL;
- let botembed = new Discord.RichEmbed()
- .setDescription("Bot Information")
- .setColor("#51ff77")
- .setThumbnail(bicon)
- .addField("Bot Name", bot.user.username)
- .addField("Created On", bot.user.createdAt);
- return message.channel.send(botembed);
- }
- if (message.content === "SALserverinfo"){
- let sicon = message.guild.iconURL;
- let serverembed = new Discord.RichEmbed()
- .setDescription("Server Information")
- .setColor("#51ffff")
- .setThumbnail(sicon)
- .addField("Server Name", message.guild.name)
- .addField("Created On", message.guild.createdAt)
- .addField("You Joined", message.member.joinedAt)
- .addField("Total Members", message.guild.memberCount);
- return message.channel.send(serverembed);
- }
- if(message.content == `SALreport`){
- let rUSer = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
- if(!rUSer) return message.channel.send("Couldn't find user.");
- let reason = args.join(" ").slice(22);
- let reportEmbed = new Discord.RichEmbed()
- .setDescription("Reports")
- .setColor("#15f")
- .addField("Reported User", `${rUSer} with ID: ${rUser.id}`)
- .addField("Reported By", `${message.author} with ID: ${message.author.id}`)
- .addField("Channel", message.channel)
- .addField("Time", message.createdAt)
- .addField("Reason", reason);
- let reportschannel = message.guild.channel.find(`name`, "reports");
- if(!reportschannel) return message.channel.send("Couldn't find reports channel.");
- message.delete().catch(O_o=>{});
- reportschannel.send(reportEmbed);
- }
- });
- bot.on("ready", function(){
- console.log(`
- READY!
- /$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$$$$$$ /$$
- /$$__ $$ /$$__ $$| $$ | $$ | $$ | $$__ $$ | $$
- | $$ \__/| $$ \ $$| $$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$ /$$$$$$ | $$ \ $$ /$$$$$$ /$$$$$$
- | $$$$$$ | $$$$$$$$| $$ |_ $$_/ | $$ | $$ /$$__ $$ /$$__ $$|_ $$_/ | $$$$$$$ /$$__ $$|_ $$_/
- \____ $$| $$__ $$| $$ | $$ | $$ | $$| $$$$$$$$| $$$$$$$$ | $$ | $$__ $$| $$ \ $$ | $$
- /$$ \ $$| $$ | $$| $$ | $$ /$$| $$ | $$| $$_____/| $$_____/ | $$ /$$| $$ \ $$| $$ | $$ | $$ /$$
- | $$$$$$/| $$ | $$| $$$$$$$$| $$$$/| $$$$$$$| $$$$$$$| $$$$$$$ | $$$$/| $$$$$$$/| $$$$$$/ | $$$$/
- \______/ |__/ |__/|________/ \___/ \____ $$ \_______/ \_______/ \___/ |_______/ \______/ \___/
- /$$ | $$
- | $$$$$$/
- \______/
- `)
- });
- bot.login(token);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement