(name: string)
| 2118 | body: JSON.stringify({ |
| 2119 | name, |
| 2120 | color: 0, |
| 2121 | permissions: "0", |
| 2122 | }), |
| 2123 | }); |
| 2124 | const json = await fetched.json(); |
| 2125 | const role = new Role(json, this); |
| 2126 | this.roleids.set(role.id, role); |
| 2127 | this.roles.push(role); |
| 2128 | return role; |
| 2129 | } |
| 2130 | async updateRolePermissions(id: string, perms: Permissions) { |
| 2131 | const role = this.roleids.get(id); |
| 2132 | if (!role) { |
| 2133 | return; |
| 2134 | } |
| 2135 | role.permissions.allow = perms.allow; |
| 2136 | role.permissions.deny = perms.deny; |
| 2137 | |
| 2138 | await fetch(this.info.api + "/guilds/" + this.id + "/roles/" + role.id, { |
nothing calls this directly
no outgoing calls
no test coverage detected