Found 7 repositories(showing 7)
CasuallyCalm
An embed version of the built in help command for discord.py
marie-bnl
A simple yet pretty help menu for discord.py bots
yaxiaro
const http = require("http"); const express = require("express"); const app = express(); app.get("/", (request, response) => { response.sendStatus(200); }); app.listen(process.env.PORT); setInterval(() => { http.get(`http://noble-even-headphones.glitch.me/`); }, 280000); // كل البكجات الي ممكن تحتجها في اي بوت const { Client, RichEmbed } = require("discord.js"); var { Util } = require("discord.js"); const { TOKEN, YT_API_KEY, prefix, devs } = require("./config"); const MrFOG = new Client({ disableEveryone: true }); const ytdl = require("ytdl-core"); const canvas = require("canvas"); const Canvas = require("canvas"); const convert = require("hh-mm-ss"); const fetchVideoInfo = require("youtube-info"); const botversion = require("./package.json").version; const simpleytapi = require("simple-youtube-api"); const moment = require("moment"); const fs = require("fs"); const util = require("util"); const gif = require("gif-search"); const opus = require("node-opus"); const ms = require("ms"); const jimp = require("jimp"); const { get } = require("snekfetch"); const guild = require("guild"); const dateFormat = require("dateformat"); //npm i dateformat const YouTube = require("simple-youtube-api"); const youtube = new YouTube("AIzaSyAdORXg7UZUo7sePv97JyoDqtQVi3Ll0b8"); const hastebins = require("hastebin-gen"); const getYoutubeID = require("get-youtube-id"); const yt_api_key = "AIzaSyDeoIH0u1e72AtfpwSKKOSy3IPp2UHzqi4"; const pretty = require("pretty-ms"); MrFOG.login(TOKEN); const queue = new Map(); var table = require("table").table; const Discord = require("discord.js"); MrFOG.on("ready", () => { console.log(`Iam Ready My Owner ${MrFOG.user.tag}!`); }); ///// let anti = JSON.parse(fs.readFileSync("./antigreff.json", "UTF8")); let config = JSON.parse(fs.readFileSync("./config.json", "UTF8")); MrFOG.on("message", message => { if (!message.channel.guild) return; let user = anti[message.guild.id + message.author.id]; let num = message.content .split(" ") .slice(2) .join(" "); if (!anti[message.guild.id + message.author.id]) anti[message.guild.id + message.author.id] = { actions: 0 }; if (!config[message.guild.id]) config[message.guild.id] = { banLimit: 3, chaDelLimit: 3, roleDelLimit: 3, kickLimits: 3, roleCrLimits: 3, time: 30 }; if (message.content.startsWith(prefix + "settings limits")) { if (message.content.startsWith(prefix + "settings limitsban")) { if (!num) return message.channel.send("**⇏ | تكایە ژمارە بنوسە ! **"); if (isNaN(num)) return message.channel.send("**⇏ | بەس ژمارە بنوسە ! **"); config[message.guild.id].banLimit = num; message.channel.send( `**⇏ | گۆڕا بۆ : ${config[message.guild.id].banLimit} **` ); } if (message.content.startsWith(prefix + "settings limitskick")) { if (!num) return message.channel.send("**⇏ | تكایە ژمارە بنوسە ! **"); if (isNaN(num)) return message.channel.send("**⇏ | بەس ژمارە بنوسە ! **"); config[message.guild.id].kickLimits = num; message.channel.send( `**⇏ | گۆڕا بۆ : ${config[message.guild.id].kickLimits}**` ); } if (message.content.startsWith(prefix + "settings limitsroleD")) { if (!num) return message.channel.send("**⇏ | تكایە ژمارە بنوسە ! **"); if (isNaN(num)) return message.channel.send("**⇏ | بەس ژمارە بنوسە ! **"); config[message.guild.id].roleDelLimit = num; message.channel.send( `**⇏ | گۆڕا بۆ : ${config[message.guild.id].roleDelLimit}**` ); } if (message.content.startsWith(prefix + "settings limitsroleC")) { if (!num) return message.channel.send("**⇏ | تكایە ژمارە بنوسە ! **"); if (isNaN(num)) return message.channel.send("**⇏ | بەس ژمارە بنوسە! **"); config[message.guild.id].roleCrLimits = num; message.channel.send( `**⇏ | گۆڕا بۆ : ${config[message.guild.id].roleCrLimits}**` ); } if (message.content.startsWith(prefix + "settings limitschannelD")) { if (!num) return message.channel.send("**⇏ | تكایە ژمارە بنوسە ! **"); if (isNaN(num)) return message.channel.send("**⇏ | بەس ژمارە بنوسە! **"); config[message.guild.id].chaDelLimit = num; message.channel.send( `**⇏ | گۆڕا بۆ : ${config[message.guild.id].chaDelLimit}**` ); } if (message.content.startsWith(prefix + "settings limitschannelC")) { if (!num) return message.channel.send("**⇏ | تكایە ژمارە بنوسە ! **"); if (isNaN(num)) return message.channel.send("**⇏ | بەس ژمارە بنوسە! **"); config[message.guild.id].chaCrLimit = num; message.channel.send( `**⇏ | گۆڕا بۆ : ${config[message.guild.id].chaCrLimit}**` ); } if (message.content.startsWith(prefix + "settings limitstime")) { if (!num) return message.channel.send("**⇏ | تكایە ژمارە بنوسە ! **"); if (isNaN(num)) return message.channel.send("**⇏ | بەس ژمارە بنوسە! **"); config[message.guild.id].time = num; message.channel.send(`**⇏ |گۆڕا بۆ: ${config[message.guild.id].time}**`); } fs.writeFile("./config.json", JSON.stringify(config, null, 2), function(e) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function( e ) { if (e) throw e; }); } }); MrFOG.on("channelCreate", async channel => { const entry1 = await channel.guild .fetchAuditLogs({ type: "CHANNEL_CREATE" }) .then(audit => audit.entries.first()); console.log(entry1.executor.username); const entry = entry1.executor; if (!config[channel.guild.id]) config[channel.guild.id] = { banLimit: 3, chaDelLimit: 3, roleDelLimit: 3, kickLimits: 3, chaCrLimit: 3, roleCrLimits: 3 }; if (!anti[channel.guild.id + entry.id]) { anti[channel.guild.id + entry.id] = { actions: 1 }; setTimeout(() => { anti[channel.guild.id + entry.id].actions = "0"; }, config[channel.guild.id].time * 1000); } else { anti[channel.guild.id + entry.id].actions = Math.floor( anti[channel.guild.id + entry.id].actions + 1 ); console.log("TETS"); setTimeout(() => { anti[channel.guild.id + entry.id].actions = "0"; }, config[channel.guild.id].time * 1000); if ( anti[channel.guild.id + entry.id].actions >= config[channel.guild.id].chaCrLimit ) { channel.guild.members .get(entry.id) .ban() .catch(e => channel.guild.owner.send( `**⇏ | ${entry.username} ژوری زۆری دروست كرد **` ) ); anti[channel.guild.id + entry.id].actions = "0"; fs.writeFile("./config.json", JSON.stringify(config, null, 2), function( e ) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function( e ) { if (e) throw e; }); } } fs.writeFile("./config.json", JSON.stringify(config, null, 2), function(e) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function(e) { if (e) throw e; }); }); MrFOG.on("channelDelete", async channel => { const entry1 = await channel.guild .fetchAuditLogs({ type: "CHANNEL_DELETE" }) .then(audit => audit.entries.first()); console.log(entry1.executor.username); const entry = entry1.executor; if (!config[channel.guild.id]) config[channel.guild.id] = { banLimits: 3, chaDelLimit: 3, roleDelLimit: 3, kickLimits: 3, chaCrLimit: 3, roleCrLimits: 3 }; if (!anti[channel.guild.id + entry.id]) { anti[channel.guild.id + entry.id] = { actions: 1 }; setTimeout(() => { anti[channel.guild.id + entry.id].actions = "0"; }, config[channel.guild.id].time * 1000); } else { anti[channel.guild.id + entry.id].actions = Math.floor( anti[channel.guild.id + entry.id].actions + 1 ); console.log("TETS"); setTimeout(() => { anti[channel.guild.id + entry.id].actions = "0"; }, config[channel.guild.id].time * 1000); if ( anti[channel.guild.id + entry.id].actions >= config[channel.guild.id].chaDelLimit ) { channel.guild.members .get(entry.id) .ban() .catch(e => channel.guild.owner.send( `**⇏ | ${entry.username} ژوری زۆری سڕیەوە **` ) ); anti[channel.guild.id + entry.id].actions = "0"; fs.writeFile("./config.json", JSON.stringify(config, null, 2), function( e ) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function( e ) { if (e) throw e; }); } } fs.writeFile("./config.json", JSON.stringify(config, null, 2), function(e) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function(e) { if (e) throw e; }); }); MrFOG.on("roleDelete", async channel => { const entry1 = await channel.guild .fetchAuditLogs({ type: "ROLE_DELETE" }) .then(audit => audit.entries.first()); console.log(entry1.executor.username); const entry = entry1.executor; if (!config[channel.guild.id]) config[channel.guild.id] = { banLimit: 3, chaDelLimit: 3, roleDelLimit: 3, kickLimits: 3, chaCrLimit: 3, roleCrLimits: 3 }; if (!anti[channel.guild.id + entry.id]) { anti[channel.guild.id + entry.id] = { actions: 1 }; setTimeout(() => { anti[channel.guild.id + entry.id].actions = "0"; }, config[channel.guild.id].time * 1000); } else { anti[channel.guild.id + entry.id].actions = Math.floor( anti[channel.guild.id + entry.id].actions + 1 ); console.log("TETS"); setTimeout(() => { anti[channel.guild.id + entry.id].actions = "0"; }, config[channel.guild.id].time * 1000); if ( anti[channel.guild.id + entry.id].actions >= config[channel.guild.id].roleDelLimit ) { channel.guild.members .get(entry.id) .ban() .catch(e => channel.guild.owner.send( `**⇏ | ${entry.username} ڕۆڵی زۆری سڕیەوە **` ) ); anti[channel.guild.id + entry.id].actions = "0"; fs.writeFile("./config.json", JSON.stringify(config, null, 2), function( e ) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function( e ) { if (e) throw e; }); } } fs.writeFile("./config.json", JSON.stringify(config, null, 2), function(e) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function(e) { if (e) throw e; }); }); MrFOG.on("roleCreate", async channel => { const entry1 = await channel.guild .fetchAuditLogs({ type: "ROLE_CREATE" }) .then(audit => audit.entries.first()); console.log(entry1.executor.username); const entry = entry1.executor; if (!config[channel.guild.id]) config[channel.guild.id] = { banLimit: 3, chaDelLimit: 3, roleDelLimit: 3, kickLimits: 3, chaCrLimit: 3, roleCrLimits: 3 }; if (!anti[channel.guild.id + entry.id]) { anti[channel.guild.id + entry.id] = { actions: 1 }; setTimeout(() => { anti[channel.guild.id + entry.id].actions = "0"; }, config[channel.guild.id].time * 1000); } else { anti[channel.guild.id + entry.id].actions = Math.floor( anti[channel.guild.id + entry.id].actions + 1 ); console.log("TETS"); setTimeout(() => { anti[channel.guild.id + entry.id].actions = "0"; }, config[channel.guild.id].time * 1000); if ( anti[channel.guild.id + entry.id].actions >= config[channel.guild.id].roleCrLimits ) { channel.guild.members .get(entry.id) .ban() .catch(e => channel.guild.owner.send( `**⇏ | ${entry.username} ڕۆڵی زۆری دروست كرد **` ) ); anti[channel.guild.id + entry.id].actions = "0"; fs.writeFile("./config.json", JSON.stringify(config, null, 2), function( e ) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function( e ) { if (e) throw e; }); } } fs.writeFile("./config.json", JSON.stringify(config, null, 2), function(e) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function(e) { if (e) throw e; }); }); MrFOG.on("guildBanAdd", async (guild, user) => { const entry1 = await user.guild .fetchAuditLogs({ type: "MEMBER_BAN_ADD" }) .then(audit => audit.entries.first()); console.log(entry1.executor.username); const entry = entry1.executor; if (!config[guild.id]) config[guild.id] = { banLimit: 1, chaDelLimit: 3, roleDelLimit: 3, kickLimits: 1, chaCrLimit: 3, roleCrLimits: 3 }; if (!anti[guild.id + entry.id]) { anti[guild.id + entry.id] = { actions: 1 }; setTimeout(() => { anti[guild.id + entry.id].actions = "0"; }, config[guild.id].time * 1000); } else { anti[guild.id + entry.id].actions = Math.floor( anti[guild.id + entry.id].actions + 1 ); console.log("TETS"); setTimeout(() => { anti[guild.id + entry.id].actions = "0"; }, config[guild.id].time * 1000); if (anti[guild.id + entry.id].actions >= config[guild.id].banLimit) { user.members .get(entry.id) .ban() .catch(e => user.owner.send(`**⇏ | ${entry.username} باندی زۆری كرد **`) ); anti[guild.id + entry.id].actions = "0"; fs.writeFile("./config.json", JSON.stringify(config, null, 2), function( e ) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function( e ) { if (e) throw e; }); } } fs.writeFile("./config.json", JSON.stringify(config, null, 2), function(e) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function(e) { if (e) throw e; }); }); MrFOG.on("guildKickAdd", async (guild, user) => { const entry1 = await user .fetchAuditLogs({ type: "MEMBER_KICK" }) .then(audit => audit.entries.first()); console.log(entry1.executor.username); const entry = entry1.executor; if (!config[guild.id]) config[guild.id] = { banLimit: 1, chaDelLimit: 3, roleDelLimit: 3, kickLimits: 1, chaCrLimit: 3, roleCrLimits: 3 }; if (!anti[guild.id + entry.id]) { anti[guild.id + entry.id] = { actions: 1 }; setTimeout(() => { anti[guild.id + entry.id].actions = "0"; }, config[guild.id].time * 1000); } else { anti[guild.id + entry.id].actions = Math.floor( anti[guild.id + entry.id].actions + 1 ); console.log("TETS"); setTimeout(() => { anti[guild.id + entry.id].actions = "0"; }, config[guild.id].time * 1000); if (anti[guild.id + entry.id].actions >= config[guild.id].banLimit) { user.members .get(entry.id) .ban() .catch(e => user.owner.send(`**⇏ | ${entry.username}كیكی زۆری كرد **`)); anti[guild.id + entry.id].actions = "0"; fs.writeFile("./config.json", JSON.stringify(config, null, 2), function( e ) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function( e ) { if (e) throw e; }); } } fs.writeFile("./config.json", JSON.stringify(config, null, 2), function(e) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function(e) { if (e) throw e; }); }); MrFOG.on("guildMemberRemove", async member => { const entry1 = await member.guild .fetchAuditLogs() .then(audit => audit.entries.first()); if (entry1.action === "MEMBER_KICK") { const entry2 = await member.guild .fetchAuditLogs({ type: "MEMBER_kicked" }) .then(audit => audit.entries.first()); const entry = entry2.executor; if (!config[member.guild.id]) config[guild.id] = { banLimit: 1, chaDelLimit: 3, roleDelLimit: 3, kickLimits: 1, chaCrLimit: 3, roleCrLimits: 3 }; if (!anti[member.guild.id + entry.id]) { anti[member.guild.id + entry.id] = { actions: 1 }; setTimeout(() => { anti[member.guild.id + entry.id].actions = "0"; }, config[member.guild.id].time * 1000); } else { anti[member.guild.id + entry.id].actions = Math.floor( anti[member.guild.id + entry.id].actions + 1 ); console.log("TETS"); setTimeout(() => { anti[member.guild.id + entry.id].actions = "0"; }, config[member.guild.id].time * 1000); if ( anti[member.guild.id + entry.id].actions >= config[member.guild.id].kickLimits ) { member.members .get(entry.id) .ban() .catch(e => member.owner.send(`**⇏ | ${entry.username} كیكی زۆری كرد **`) ); anti[member.guild.id + entry.id].actions = "0"; fs.writeFile("./config.json", JSON.stringify(config, null, 2), function( e ) { if (e) throw e; }); fs.writeFile( "./antigreff.json", JSON.stringify(anti, null, 2), function(e) { if (e) throw e; } ); } } fs.writeFile("./config.json", JSON.stringify(config, null, 2), function(e) { if (e) throw e; }); fs.writeFile("./antigreff.json", JSON.stringify(anti, null, 2), function( e ) { if (e) throw e; }); } }); MrFOG.on("ready", async () => { console.log(`Logged in as ${MrFOG.user.tag}!`); setInterval(function() { MrFOG.user.setPresence({ game: { name: "b*help | it’s time to secure your server!", url: "https://www.twitch.tv/ProESTGaming", type: 1 } }); }, 60 * 1000); }); var Enmap = require("enmap"); MrFOG.antibots = new Enmap({ name: "antibots" }); var antibots = MrFOG.antibots; var julian = MrFOG; julian.on("message", codes => { var prefix = "b*"; if (codes.content == prefix + "antibots on") { if ( codes.author.bot || !codes.channel.guild || codes.author.id != codes.guild.ownerID ) return; antibots.set(`${codes.guild.id}`, { onoff: "On" }); codes.channel.send( `**✅ **__بە سەرکەوتوانە ئێستا بۆت ناتوانێ جۆین سێرڤەر بێت__** :x2:**` ); } if (codes.content == prefix + "antibots off") { if ( codes.author.bot || !codes.channel.guild || codes.author.id != codes.guild.ownerID ) return; antibots.set(`${codes.guild.id}`, { onoff: "Off" }); codes.channel.send( `****✅ __بە سەرکەوتوانە ئێستا بۆت دەتوانی جۆین ی سێرڤەر بکات__** :x2:**` ); } }); julian.on("guildMemberAdd", member => { if (!antibots.get(`${member.guild.id}`)) { antibots.set(`${member.guild.id}`, { onoff: "Off" }); } if (antibots.get(`${member.guild.id}`).onoff == "Off") return; if (member.user.bot) return member.ban(); }); MrFOG.on("message", message => { if (message.content === prefix + "help") { let embed = new Discord.RichEmbed() .setAuthor(message.author.username) .setColor("#000000").setDescription(`> __ Anti hack commands __ > 〔 ${prefix}settings limitsban 〕⇰ 『 Number 3 』 > 〔 ${prefix}settings limitskick 〕⇰ 『 Number 3 』 > 〔 ${prefix}settings limitsroleD 〕⇰ 『 Number 3 』 > 〔 ${prefix}settings limitsroleC 〕⇰ 『 Number 3 』 > 〔 ${prefix}settings limitschannelD 〕⇰ 『 Number 3 』 > 〔 ${prefix}settings limitschannelC 〕⇰ 『 Number 3 』 > 〔 ${prefix}settings limitstime 〕⇰ 『 Number 3 』 > 〔 ${prefix}antibots on 〕⇰ 『 Enabled Anti bot』 > 〔 ${prefix}antibots off 〕⇰ 『 Disabed Anti bot 』 > 〔 ${prefix} serverbot 〕⇰『serverbot』 > __Created by ==> [ ᵏᵃᵏ7aji⚜:] `); message.channel.sendEmbed(embed); } }); MrFOG.on("message", message => { if (message.content === prefix + "serverbot") { if (!message.channel.guild) return; if (message.content < 1023) return; const Embed11 = new Discord.RichEmbed() .setAuthor(MrFOG.user.username, MrFOG.user.avatarURL) .setThumbnail(MrFOG.user.avatarURL) .setDescription( `***ژمارەی ئەو سێرڤەرانەی بۆتەكەی تێدایە ${ MrFOG.guilds.size } \n \n${MrFOG.guilds.map(guilds => `- ${guilds.name}`).join("\n")}***` ); message.channel.sendEmbed(Embed11); } }); module.exports = { TOKEN: "NzM4MTY0MjYyOTAzNjExNDYy.XyH7Cg.3EWAj_YH3TUfqejtnYkppl_-26c", YT_API_KEY: "NzM4MTY0MjYyOTAzNjExNDYy.XyH7Cg.3EWAj_YH3TUfqejtnYkppl_-26c", prefix: "b*", MrFOG: ["627387357976592395"] };
danielillli
Created some pretty generic Minigame's for some of you to edit and create it into your own stuff! free to join my discord for some help.
itspapi
My discord bot. Has some cool things like the ability to clone a server (WIP but works pretty well) and also a very nice automated help command
LakheLimbu
This is my mini project for OOAD subject, I had done it with pretty much help from my peers and my friends who is not from the college. The friends from the discord and friends i came across searching for the project.
GoldLion2895
Made this bot during peak lockdown. Was really messy, but got the job done, and peaked to 500k users and close to 300 servers. Got a friend to help rewrite, but the project died soon after due to discords constant change regarding devs. Code is unoptimized, but I'm pretty proud of it. Feel free to fix it!
All 7 repositories loaded