Browse Source

Re-add bulkdelete

master
Abheek Dhawan 4 years ago
parent
commit
d60e364ef5
  1. 20
      index.js

20
index.js

@ -81,8 +81,8 @@ client.on("ready", () => {
console.log("Logged in as " + client.user.tag + "!"); console.log("Logged in as " + client.user.tag + "!");
}); });
/*client.on("message", async message => { client.on("message", async message => {
switch (message.content.toLowerCase()) { /* switch (message.content.toLowerCase()) {
case '$score': case '$score':
startScoring(message); startScoring(message);
break; break;
@ -103,10 +103,11 @@ client.on("ready", () => {
case '$aboutserver': case '$aboutserver':
aboutServer(message); aboutServer(message);
break; break;
} }*/
if (message.content.toLowerCase().startsWith("$bulkdelete")) { if (message.content.toLowerCase().startsWith("$bulkdelete")) {
bulkDelete(message); bulkDelete(message);
} else if (message.content.toLowerCase().startsWith("$rolerequest")) { } /*else if (message.content.toLowerCase().startsWith("$rolerequest")) {
roleRequest(message); roleRequest(message);
} else if (message.content.toLowerCase().startsWith("$userswithrole")) { } else if (message.content.toLowerCase().startsWith("$userswithrole")) {
usersWithRole(message); usersWithRole(message);
@ -185,11 +186,6 @@ async function addRoles(user, message) {
} }
} }
async function memberCount(message) {
const memberCount = message.guild.memberCount;
message.channel.send(`Member count: ${memberCount}`);
}
async function roleRequest(message) { async function roleRequest(message) {
const readerRole = message.guild.roles.cache.get("826840765526835240"); const readerRole = message.guild.roles.cache.get("826840765526835240");
const specRole = message.guild.roles.cache.get("826849213954523216"); const specRole = message.guild.roles.cache.get("826849213954523216");
@ -247,9 +243,9 @@ async function roleRequest(message) {
}).catch("Role reaction timeout, I guess the mods don't really care about you and forgot."); }).catch("Role reaction timeout, I guess the mods don't really care about you and forgot.");
} }
async function bulkDelete(message) { */async function bulkDelete(message) {
if (!message.member.hasPermission('ADMINISTRATOR')) { if (!message.member.hasPermission('ADMINISTRATOR')) {
message.reply("you do not have permissions!"); message.reply("you do not have high enough permissions!");
return; return;
} }
const amount = parseInt(message.content.substring(12)); const amount = parseInt(message.content.substring(12));
@ -306,7 +302,7 @@ async function startScoring(message) {
} }
}); });
}) })
} }/*
client.on("guildMemberAdd", member => { client.on("guildMemberAdd", member => {
// const compRole = member.guild.roles.cache.get("826846965114339419"); // const compRole = member.guild.roles.cache.get("826846965114339419");

Loading…
Cancel
Save