Added the 'tuto' command and fixed some bugs

This commit is contained in:
ION606
2022-08-17 20:21:19 -07:00
parent b7d51c2d14
commit 9de7eecdd9
7 changed files with 166 additions and 19 deletions
+11 -3
View File
@@ -1,8 +1,16 @@
function checkRole(bot, guild, userId) {
const role = guild.roles.cache.find((role) => { return (role.name == 'Selmer Bot Commands'); })
function checkRole(bot, guild, userId, cal = false) {
var roleName;
if (cal) {
roleName = "Selmer Bot Calendar";
} else {
roleName = "Selmer Bot Commands";
}
const role = guild.roles.cache.find((role) => { return (role.name == roleName); })
const user = guild.members.cache.get(userId);
return (user.roles.cache.get(role.id) || user.id == guild.ownerId || bot.inDebugMode);
return (role != undefined && user.roles.cache.has(role.id)); // || user.id == guild.ownerId || bot.inDebugMode
/*Maybe implement this later, useless for now