Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Config & Setup
- const Discord = require("discord.js");
- const bot = new Discord.Client();
- const fs = require("fs");
- const config = require("./config.json");
- let prefix = config.prefix;
- let ownerId = config.ownerId;
- let botToken = config.botToken;
- let ownerGuildId = config.ownerGuildId;
- //Bot On
- bot.on("ready", () => {
- console.log(`GoodPro712.Alerts! Info : ${bot.users.size} users, in ${bot.channels.size} channels of ${bot.guilds.size} guilds.\nIts GREAT to see that the bot is working!`);
- bot.user.setActivity("Use .Help", {
- type: 'PLAYING'
- })
- bot.on("message", message => {
- if (message.author.bot) return;
- if(message.content.indexOf(config.prefix) !== 0) return;
- const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
- const command = args.shift().toLowerCase();
- var guild = message.guild;
- );
- if(command === '') {
- //If someone types the prefix it will respond with this.
- //If people just use . in texting meaning no comment it can be annoying (Maybe change prefix).
- message.channel.send("Please type a command!")
- }; //Working
- process.on("unhandledRejection", err => {
- bot.guilds.get().channels.get().send({embederror})
- }); //Needs Test
- //Commands
- if(command === 'help') {
- //Shows every command and tells people what there use for.
- message.channel.send(`__Help__ **Prefix ${config.prefix}**\n\nHelp\nBotinfo\nPing\nTest\nNotify\nBegger\nSpeak\nSoon\n\n__**Mannage Messages** Commands__\n\nTempmute\n\n__Owner Commands__\n\nStatus\nStatusActivity\n\n**Bot By GoodPro712#0932**`);
- } else //Working
- if(command === 'soon') {
- message.channel.send("__Commands Comming Soon__\n\nDrop\nSupply\nKick\nBan\nWarn\nMute\nSlowmode\nGen\nGiveaway\nColor\nCommand\nSpeakEmbed\nStory\nMeme\nPeronalDM\n\nBot By GoodPro712#0932")
- } else//Needs Test
- if(command === 'botinfo') {
- //Tells the user info about this bot.
- message.channel.send(`Users... ${bot.users.size}\nChannels... ${bot.channels.size}\nServers... ${bot.guilds.size}!`);
- } else //Working
- if(command === 'test') {
- //Testing if the bot is online & working.
- message.channel.send("Bot is Online & WORKING YAY!!");
- } else //Working
- if(command === 'speak') {
- //Says what you tell it to say while deleting your message.
- let text = args.join(" ")
- message.delete()
- message.channel.send(text)
- } else //Working
- if(command === 'notify') {
- //DM's everyone on your server what you tell it to DM (Can be Dangerous).
- let DMedMsg = args.join(" ");
- {if(message.author.id !== ownerId) return;
- bot.guilds.get(config.ownerGuildId).members.forEach(m => {
- m.send(DMedMsg)}),
- message.channel.send(`The Message: **${DMedMsg}** Has Been Direct Messaged To Everyone!!`)}
- } else //Working. Only works on my server.
- if(command === 'ping') {
- message.channel.send(bot.ping + "ms.");
- } else //Needs Test
- if(command === 'begger') {
- let addBegger = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
- var roleB = message.guild.roles.find(roleB =>
- roleB.name === "Begger");
- addBegger.addRole(roleB.id).then(() => {});
- } else //Need Test
- if(command === 'status') {
- //Changes Status
- let selfStatus = args.join(" ");
- if(message.author.id !== ownerId) return;
- bot.user.setActivity(selfStatus, {
- type: statusActivity})
- } else //Working
- if(command === 'statusactivity') {
- let statusActivity = args.join(" ");
- if(message.author.id !== ownerId) return;
- bot.user.setActivity(selfStatus, {
- type: statusActivity})
- } else //Need Test
- if(command === 'drop') {
- let dropTime = args.join(" ").args[1];
- if(!dropTime) return message.reply("You didn't specify a time!");
- message.channel.send(`Dropping in ${dropTime} SECONDS!!!`)
- setTimeout(function() {
- message.channel.send("Test");
- }, ms(dropTime));
- } else //Needs Test
- //Bot Token
- });
- bot.login(config.botToken)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement