Parent Directory
|
Revision Log
Release version 1.10.0 * Added -queues command to list all queued jobs * Added -joke command to fetch random jokes * Added support of user tags in some user-based commands
1 | rakin | 49 | module.exports = async (member, guild) => { |
2 | const config = app.config.props[guild.id].autorole; | ||
3 | |||
4 | if (config.enabled) { | ||
5 | for await (const roleID of config.roles) { | ||
6 | try { | ||
7 | const role = await guild.roles.fetch(roleID); | ||
8 | |||
9 | if (role) { | ||
10 | await member.roles.add(role); | ||
11 | } | ||
12 | } | ||
13 | catch (e) { | ||
14 | console.log(e); | ||
15 | } | ||
16 | } | ||
17 | } | ||
18 | }; |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |