mirror of
https://github.com/ION606/selmerBot.git
synced 2026-06-05 23:06:14 +00:00
Added the 'tuto' command and fixed some bugs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user