Merge branch 'master' of github.com:Dragory/ZeppelinBot
This commit is contained in:
commit
38ea14a442
1 changed files with 2 additions and 2 deletions
|
@ -1392,8 +1392,8 @@ export async function resolveRoleId(bot: Client, guildId: string, value: string)
|
||||||
// Role name
|
// Role name
|
||||||
const roleList = (await bot.guilds.fetch(guildId as Snowflake)).roles.cache;
|
const roleList = (await bot.guilds.fetch(guildId as Snowflake)).roles.cache;
|
||||||
const role = roleList.filter(x => x.name.toLocaleLowerCase() === value.toLocaleLowerCase());
|
const role = roleList.filter(x => x.name.toLocaleLowerCase() === value.toLocaleLowerCase());
|
||||||
if (role[0]) {
|
if (role.size >= 1) {
|
||||||
return role[0].id;
|
return role.firstKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role ID
|
// Role ID
|
||||||
|
|
Loading…
Add table
Reference in a new issue