Skip to content
This repository was archived by the owner on Jul 16, 2022. It is now read-only.

Commit 30a3ea1

Browse files
authored
4.0.1-ex
Release 4.0.1
2 parents 0c369c8 + 9fce421 commit 30a3ea1

File tree

168 files changed

+5705
-1880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+5705
-1880
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Configuration/config.json
2+
Configuration/auth.json
3+
Extensions/

Commands/PM/afk.js

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,30 @@ module.exports = (bot, db, config, winston, userDocument, msg, suffix, commandDa
22
if(suffix) {
33
if(suffix==".") {
44
userDocument.afk_message = null;
5-
msg.channel.createMessage("Welcome back! 🎊 I removed your AFK message");
5+
msg.channel.createMessage({
6+
embed: {
7+
author: {
8+
name: bot.user.username,
9+
icon_url: bot.user.avatarURL,
10+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
11+
},
12+
color: 0x9ECDF2,
13+
description: "Welcome back! 🎊\nI removed your AFK message"
14+
}
15+
});
616
} else {
717
userDocument.afk_message = suffix;
8-
msg.channel.createMessage(`Alright, I'll show that when someone mentions you on a server. 👌 Use \`${commandData.name} .\` to remove it`);
18+
msg.channel.createMessage({
19+
embed: {
20+
author: {
21+
name: bot.user.username,
22+
icon_url: bot.user.avatarURL,
23+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
24+
},
25+
color: 0x9ECDF2,
26+
description: `Alright, I'll show that when someone mentions you on a server. 👌\nUse \`${commandData.name} .\` to remove it`
27+
}
28+
});
929
}
1030
userDocument.save(err => {
1131
if(err) {
@@ -14,9 +34,29 @@ module.exports = (bot, db, config, winston, userDocument, msg, suffix, commandDa
1434
});
1535
} else {
1636
if(userDocument.afk_message) {
17-
msg.channel.createMessage(`You have the AFK message \`${userDocument.afk_message}\` set right now 💭`);
37+
msg.channel.createMessage({
38+
embed: {
39+
author: {
40+
name: bot.user.username,
41+
icon_url: bot.user.avatarURL,
42+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
43+
},
44+
color: 0x9ECDF2,
45+
description: `You have the AFK message \`${userDocument.afk_message}\` set right now 💭`
46+
}
47+
});
1848
} else {
19-
msg.channel.createMessage("You don't have an AFK message set right now ⌨️");
49+
msg.channel.createMessage({
50+
embed: {
51+
author: {
52+
name: bot.user.username,
53+
icon_url: bot.user.avatarURL,
54+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
55+
},
56+
color: 0x00FF00,
57+
description: "You don't have an AFK message set right now ⌨️"
58+
}
59+
});
2060
}
2161
}
2262
};

Commands/PM/config.js

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,31 @@ module.exports = (bot, db, config, winston, userDocument, msg, suffix) => {
33
// Maintainer console for overall bot things
44
if(config.maintainers.indexOf(msg.author.id)>-1 && !suffix) {
55
if(config.hosting_url) {
6-
msg.channel.createMessage(`🌎 ${config.hosting_url}dashboard/overview?svrid=maintainer`);
6+
msg.channel.createMessage({
7+
embed: {
8+
author: {
9+
name: bot.user.username,
10+
icon_url: bot.user.avatarURL,
11+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
12+
},
13+
title: "Here's the link for the Maintainer Console:",
14+
description: `${config.hosting_url}dashboard/overview?svrid=maintainer`,
15+
color: 0x9ECDF2
16+
}
17+
});
718
} else {
8-
msg.channel.createMessage("**Limited mode:** You have not provided a hosting URL in the bot config, so the maintainer console is not available.");
19+
msg.channel.createMessage({
20+
embed: {
21+
author: {
22+
name: bot.user.username,
23+
icon_url: bot.user.avatarURL,
24+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
25+
},
26+
title: "Warning! Bot is running in __Limited Mode__",
27+
description: "You have not provided a hosting URL in the bot config, so the maintainer console is not available.",
28+
color: 0xFF0000
29+
}
30+
});
931
}
1032
}
1133

@@ -14,20 +36,64 @@ module.exports = (bot, db, config, winston, userDocument, msg, suffix) => {
1436
const svr = bot.serverSearch(suffix, msg.author, userDocument);
1537
// Check if specified server exists
1638
if(!svr) {
17-
msg.channel.createMessage("Sorry, invalid server. 🙁 Try again?");
39+
msg.channel.createMessage({
40+
embed: {
41+
author: {
42+
name: bot.user.username,
43+
icon_url: bot.user.avatarURL,
44+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
45+
},
46+
color: 0xFF0000,
47+
title: "Error",
48+
description: "Sorry, but the server name you entered is invalid. 🙁 Try again?"
49+
}
50+
});
1851
// Check if sender is an admin of the specified server
1952
} else {
2053
const member = svr.members.get(msg.author.id);
2154
// Get server data
2255
db.servers.findOne({_id: svr.id}, (err, serverDocument) => {
2356
if(!err && member && serverDocument && serverDocument.config.blocked.indexOf(msg.author.id)==-1) {
2457
if(bot.getUserBotAdmin(svr, serverDocument, member)>=3) {
25-
msg.channel.createMessage(`🌎 ${config.hosting_url}dashboard/overview?svrid=${svr.id}`);
58+
msg.channel.createMessage({
59+
embed: {
60+
author: {
61+
name: bot.user.username,
62+
icon_url: bot.user.avatarURL,
63+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
64+
},
65+
color: 0x00FF00,
66+
title: "Here's the link to the requested Admin Panel",
67+
description: `${config.hosting_url}dashboard/overview?svrid=${svr.id}`
68+
}
69+
});
2670
} else {
27-
msg.channel.createMessage("You are not an admin for that server.");
71+
msg.channel.createMessage({
72+
embed: {
73+
author: {
74+
name: bot.user.username,
75+
icon_url: bot.user.avatarURL,
76+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
77+
},
78+
color: 0xFF0000,
79+
title: "Error",
80+
description: "You are not an admin for that server\nIf you think this was a mistake, please contact the server owner!"
81+
}
82+
});
2883
}
2984
} else {
30-
msg.channel.createMessage("Sorry, invalid server. 🙁 Try again?");
85+
msg.channel.createMessage({
86+
embed: {
87+
author: {
88+
name: bot.user.username,
89+
icon_url: bot.user.avatarURL,
90+
url: "https://github.com/GilbertGobbels/GAwesomeBot"
91+
},
92+
color: 0x9ECDF2,
93+
title: "Error",
94+
description: "Sorry, but the server name you entered is invalid. 🙁 Try again?"
95+
}
96+
});
3197
}
3298
});
3399
}

0 commit comments

Comments
 (0)