MCPcopy Create free account
hub / github.com/RTByte/rtbyte / createRole

Method createRole

src/commands/Moderator/vcban.js:69–84  ·  view source on GitHub ↗
(guild)

Source from the content-addressed store, hash-verified

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};

Callers 1

runMethod · 0.45

Calls 2

createMethod · 0.80
updateMethod · 0.80

Tested by

no test coverage detected