added inital user role code

This commit is contained in:
steev
2022-12-03 14:19:59 +01:00
parent be3168511d
commit 9512a85d2f

13
Commons/Services/Roles.js Normal file
View File

@ -0,0 +1,13 @@
const discord = require("discord.js")
/**
assigns a given role to a given user
@param {discord.User} userVal the target user
@param {string} roleName name of role to assign a user
@param {discord.Client} bot the bots instance
*/
const AddRole = async (userVal, roleName, bot) => {
const guild = bot.guilds.cache.first()
const role = guild.roles.find("name", roleName)
}