mirror of
https://github.com/Alee14/AleeBot.git
synced 2025-01-23 11:41:51 -05:00
Update aleebot.js
This commit is contained in:
parent
d4730eb21d
commit
20dfde1f0c
1 changed files with 7 additions and 66 deletions
73
aleebot.js
73
aleebot.js
|
@ -86,19 +86,6 @@ client.on("message", function(message){
|
|||
message.author.send("You have been caught swearing in AleeArmy Community.");
|
||||
} */
|
||||
|
||||
function isMod(member) {
|
||||
if (member != null) {
|
||||
if (member.roles.find("name", "King Alee") || member.roles.find("name", "Co-Owner") || member.roles.find("name", "Admin") || member.roles.find("name", "Moderator") || member.roles.find("name", "Upper Council of Explorers") || member.roles.find("name", "Lower Council of Explorers") || member.roles.find("name", "Pseudo-Moderator") || member.roles.find("name", "Staff") || member.roles.find("name", "The Crew") || member.roles.find("name", "Mini-Mods")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (command === 'help'){
|
||||
var embed = new Discord.RichEmbed()
|
||||
.setTitle('Commands for AleeBot ' + abversion )
|
||||
|
@ -174,60 +161,14 @@ commandProcessed = true;
|
|||
}
|
||||
|
||||
if(command === 'userinfo'){
|
||||
var embed = new Discord.RichEmbed()
|
||||
.setAuthor(message.author.username)
|
||||
.setDescription("This is your user info!")
|
||||
.setColor("#7af442")
|
||||
.addField("Username", `${message.author.username}#${message.author.discriminator}`)
|
||||
.addField("Created At", message.author.createdAt)
|
||||
message.channel.sendEmbed(embed);
|
||||
|
||||
if (!isMod(message.member)) {
|
||||
var member = message.member;
|
||||
embed = new Discord.RichEmbed("test");
|
||||
embed.setAuthor(getUserString(member), member.user.displayAvatarURL);
|
||||
embed.setColor("#FF0000");
|
||||
embed.setDescription("User Information");
|
||||
|
||||
{
|
||||
var msg = "**Created** " + member.user.createdAt.toUTCString() + "\n";
|
||||
if (member.joinedAt.getTime() == 0) {
|
||||
msg += "**Joined** -∞... and beyond! Discord seems to be giving incorrect info... :(";
|
||||
} else {
|
||||
msg += "**Joined** " + member.joinedAt.toUTCString();
|
||||
}
|
||||
|
||||
embed.addField("Timestamps", msg);
|
||||
}
|
||||
|
||||
{
|
||||
var msg = "**Current Display Name** " + member.displayName + "\n";
|
||||
msg += "**Username** " + member.user.username + "\n";
|
||||
if (member.nickname != null) {
|
||||
msg += "**Nickname** " + member.nickname;
|
||||
} else {
|
||||
msg += "**Nickname** No nickname";
|
||||
}
|
||||
|
||||
embed.addField("Names", msg);
|
||||
}
|
||||
|
||||
/*if (member.lastMessageID != null) {
|
||||
var lastMessage = null;
|
||||
|
||||
message.channel.fetchMessage(member.lastMessage).then(function(retrievedMessage) {
|
||||
lastMessage = retrievedMessage;
|
||||
}).catch(function () {
|
||||
lastMessage = -1;
|
||||
});
|
||||
|
||||
while (lastMessage == null) {}
|
||||
|
||||
if (lastMessage != -1) {
|
||||
var msg = "**ID** " + member.lastMessageID + "\n";
|
||||
msg += "**Contents** " + lastMessage.content;
|
||||
|
||||
embed.addField("Last Message", msg);
|
||||
}
|
||||
}*/
|
||||
|
||||
embed.setFooter("User ID: " + member.user.id);
|
||||
//embed.setDescription(msg);
|
||||
message.channel.send("", {embed: embed});
|
||||
commandProcessed = true;
|
||||
}
|
||||
|
||||
if(command === 'serverinfo'){
|
||||
|
|
Loading…
Add table
Reference in a new issue