(name: string, type: number)
| 2109 | } |
| 2110 | async createRole(name: string) { |
| 2111 | const fetched = await fetch(this.info.api + "/guilds/" + this.id + "roles", { |
| 2112 | method: "POST", |
| 2113 | headers: this.headers, |
| 2114 | body: JSON.stringify({ |
| 2115 | name, |
| 2116 | color: 0, |
| 2117 | permissions: "0", |
| 2118 | }), |
| 2119 | }); |
| 2120 | const json = await fetched.json(); |
| 2121 | const role = new Role(json, this); |
| 2122 | this.roleids.set(role.id, role); |
no test coverage detected