Browse Source

Re-add aboutServer

master
Abheek Dhawan 4 years ago
parent
commit
b41c71e70d
  1. 25
      index.js

25
index.js

@ -82,28 +82,11 @@ client.on("ready", () => {
}); });
client.on("message", async message => { client.on("message", async message => {
/* switch (message.content.toLowerCase()) { switch (message.content.toLowerCase()) {
case '$score':
startScoring(message);
break;
case '$membercount':
memberCount(message);
break;
case '$addroles':
execSync("wget --no-check-certificate --output-document=participants.csv https://docs.google.com/spreadsheets/d/1lufn28YR29OkCS4wH_WQXfCalAgJRi8_r4NCesJSbQY/export\\?gid\\=2119488170\\&format\\=csv", { encoding: 'utf-8' });
csv().fromFile('participants.csv')
.then(users => {
users.forEach(function (user) {
addRoles(user, message);
});
}).catch(err => {
console.log(err);
});
break;
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);
@ -126,7 +109,7 @@ async function usersWithRole(message) {
.setFooter(`Role ID: ${roles.array()[0].id}`) .setFooter(`Role ID: ${roles.array()[0].id}`)
.setTimestamp(); .setTimestamp();
message.channel.send(roleEmbed); message.channel.send(roleEmbed);
}/* }
async function aboutServer(message) { async function aboutServer(message) {
const textChannelCount = message.guild.channels.cache.filter(c => c.type === 'text').size; const textChannelCount = message.guild.channels.cache.filter(c => c.type === 'text').size;
@ -153,7 +136,7 @@ async function aboutServer(message) {
.setFooter(`Server ID: ${message.guild.id}`) .setFooter(`Server ID: ${message.guild.id}`)
.setTimestamp(); .setTimestamp();
message.channel.send(aboutServerEmbed).catch(console.error); message.channel.send(aboutServerEmbed).catch(console.error);
} }/*
async function addRoles(user, message) { async function addRoles(user, message) {
const noviceRole = message.guild.roles.cache.get("827220856983519232"); const noviceRole = message.guild.roles.cache.get("827220856983519232");

Loading…
Cancel
Save