Skip to content

$giveRole

$giveRole will give an specific user a specific role.

Usage

$giveRole[guildID;userID;roleID;reason?]

Parameters

FieldTypeDescriptionRequired
guildIDnumberOf which guild the member should receive roles of.true
userIDnumberThe user ID of the guild member.true
roleIDnumberThe ID of the role to give.true
reason?stringThe reason that will be displayed in the guild’s audit logs.false

Please note that the bots highest role must be above the role you’re trying to assign.

Example(s)

This will assign you a role called “Admin” (if present):

1
client.command({
2
name: "giveRole",
3
code: `
4
$giveRole[$guildID;$authorID;$findRole[Admin];Some reason.]
5
`
6
});