| 67 | } |
| 68 | |
| 69 | async createRole(guild) { |
| 70 | const voiceBannedRole = await guild.roles.create({ data: { name: 'Voice Chat Banned' }, reason: `${this.client.user.username} initialization: Voice Chat Banned Role` }); |
| 71 | await guild.settings.update('roles.voiceBanned', voiceBannedRole.id, guild); |
| 72 | |
| 73 | await guild.channels.forEach(async (channel) => { |
| 74 | if (channel.type === 'voice') { |
| 75 | await channel.updateOverwrite(voiceBannedRole, { |
| 76 | CONNECT: false, |
| 77 | SPEAK: false |
| 78 | }, |
| 79 | `${this.client.user.username} initialization: Adjusting Channel Permissions for Voice Chat Banned role`); |
| 80 | } |
| 81 | }); |
| 82 | |
| 83 | return; |
| 84 | } |
| 85 | |
| 86 | }; |