Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
clqu authored May 31, 2021
1 parent 2b2b32a commit c228433
Show file tree
Hide file tree
Showing 76 changed files with 19,018 additions and 0 deletions.
55 changes: 55 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
bot: {
token: "",
prefix: "-",
owners: [""],
mongourl: "MONGODB URL"
},

website: {
callback: "https://your-domain.com/callback",
secret: "CLIENT SECRET",
clientID: "CLIENT ID",
tags: [ "Moderation", "Fun", "Minecraft","Economy","Guard","NSFW","Anime","Invite","Music","Logging", "Web Dashboard", "Reddit", "Youtube", "Twitch", "Crypto", "Leveling", "Game", "Roleplay", "Utility", "Turkish" ]
},

server: {
id: "SERVER ID",
roles: {
yonetici: "ADMINISTRATOR ROLE ID",
moderator: "MODERATOR ROLE ID",
profile: {
booster: "",
sponsor: "",
supporter: "",
partnerRole: ""
},
codeshare: {
javascript: "JS",
html: "HTML",
altyapilar: "substructure",
bdfd: "BDFD",
besdavet: "5 INVITES",
ondavet: "10 INVITES",
onbesdavet: "15 INVITES",
yirmidavet: "20 INVITES"
},
botlist: {
developer: "",
certified_developer: "",
bot: "",
certified_bot: ""
}
},
channels: {
codelog: "CODE-LOG",
login: "LOGIN-LOG",
webstatus: "WEBSITE-STATUS",
uptimelog: "UPTIME-LOG",
botlog: "BOT-LOG",
votes: "VOTE-LOG"
}
}


}
55 changes: 55 additions & 0 deletions config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
bot: {
token: "",
prefix: "-",
owners: [""],
mongourl: ""
},

website: {
callback: "",
secret: "",
clientID: "",
tags: [ "Moderation", "Fun", "Minecraft","Economy","Guard","NSFW","Anime","Invite","Music","Logging", "Web Dashboard", "Reddit", "Youtube", "Twitch", "Crypto", "Leveling", "Game", "Roleplay", "Utility", "Turkish" ]
},

server: {
id: "",
roles: {
yonetici: "",
moderator: "",
profile: {
booster: "",
sponsor: "",
supporter: "",
partnerRole: ""
},
codeshare: {
javascript: "",
html: "",
altyapilar: "",
bdfd: "",
besdavet: "",
ondavet: "",
onbesdavet: "",
yirmidavet: ""
},
botlist: {
developer: "",
certified_developer: "",
bot: "",
certified_bot: ""
}
},
channels: {
codelog: "",
login: "",
webstatus: "",
uptimelog: "",
botlog: "",
votes: ""
}
}


}
133 changes: 133 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/*=======================================================================================*/
const Discord = require("discord.js");
const { Client, Collection } = require("discord.js");
const client = (global.Client = new Client())
const config = require("./config.js");
global.config = config;
const fs = require("fs");
const fetch = require("node-fetch");
client.htmll = require('cheerio');

/*=======================================================================================*/



/*=======================================================================================*/
require('events').EventEmitter.prototype._maxListeners = 100;
client.komutlar = new Discord.Collection();
client.aliases = new Discord.Collection();
fs.readdir("./src/commands", (err, files) => {
if (err) console.error(err);
console.log(`(!) Bota ${files.length} komut başarıyla yüklendi.`);
files.forEach(f => {
if (!f.endsWith('.js')) return
let props = require(`./src/commands/${f}`);
if (!props.help) return
client.komutlar.set(props.help.name, props);
props.conf.aliases.forEach(alias => {
client.aliases.set(alias, props.help.name);
global.commands = files;
});
});
});
client.on('message', async message => {
let p = config.bot.prefix
let client = message.client;
if (message.author.bot) return;
if (!message.content.startsWith(p)) return;
let command = message.content.split(" ")[0].slice(p.length);
let params = message.content.split(" ").slice(1);
let cmd
if (client.komutlar.has(command)) {
cmd = client.komutlar.get(command);
} else if (client.aliases.has(command)) {
cmd = client.komutlar.get(client.aliases.get(command));
}
if (cmd) {}
cmd.run(client, message, params, p);
})
/*=======================================================================================*/


/*=======================================================================================*/
const codesSchema = require("./src/database/models/codes.js");
client.on('ready',async () => {
console.log("(!) Bot "+client.user.tag+" olarak başarıyla discorda bağlandı.");
let botsSchema = require("./src/database/models/botlist/bots.js");
const bots = await botsSchema.find();
client.user.setPresence({ activity: { type: 'WATCHING', name: 'vcodes.xyz | '+bots.length+' bots' }, status: "dnd" });
})
/*=======================================================================================*/



/*=======================================================================================*/
const claudette = require("./src/database/models/uptime.js")
setInterval(() => {
claudette.find({}, function (err, docs) {
if(err) console.log(err)
if(!docs) return;
docs.forEach(docs => {
fetch(docs.link).catch()
})
})
}, 300000)

client.on('guildMemberRemove', async member => {
if(member.guild.id !== config.serverID) return
claudette.find({ userID: member.id }, async function (err,docs) {
await docs.forEach(async a => {
await claudette.findOneAndDelete({ userID: member.id, code: a.code, server: a.server, link: a.link })
})
})
})
/*=======================================================================================*/


/*=======================================================================================*/
const votes = require('./src/database/models/botlist/vote.js')
client.on('ready', async () => {
setInterval(async () => {
let datalar = await votes.find()
if(datalar.length <= 0) return
datalar.forEach(async a => {
let süre = a.ms - (Date.now() - a.Date)
if(süre > 0) return
await votes.findOneAndDelete({ bot: a.bot, user: a.user })
})
}, 1500000)
})
/*=======================================================================================*/


/*=======================================================================================*/
client.on('guildMemberRemove', async member => {
const botlar = require('./src/database/models/botlist/bots.js')
let data = await botlar.findOne({ ownerID: member.id })
if(!data) return
let find = await botlar.find({ ownerID: member.id })
await find.forEach(async b => {
member.guild.members.cache.get(b.botID).kick();
await botlar.deleteOne({ botID: b.botID })
})
})
client.on("guildMemberAdd", async (member) => {
let guild = client.guilds.cache.get(config.serverID);
if (member.user.bot) {
try {
guild.member(member.id).roles.add(roles.bot);
} catch (error) {

}
}
});
/*=======================================================================================*/




/*=======================================================================================*/
require("./src/server.js")(client);
require("./src/database/connect.js")(client);
client.login(config.bot.token);
/*=======================================================================================*/
Loading

0 comments on commit c228433

Please sign in to comment.