added inital user role code
This commit is contained in:
13
Commons/Services/Roles.js
Normal file
13
Commons/Services/Roles.js
Normal 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)
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user