This repository was archived by the owner on Feb 14, 2022. It is now read-only.
This repository was archived by the owner on Feb 14, 2022. It is now read-only.
Leaving a server doesn't work. #30
Open
Description
Please describe the bug or issue in as much detail as possible:
The leave function doesn't work, because the ID is set as undefined.
Please include a reproducible code sample here, if possible:
client.houses.leave("house id");
Further details:
- Installed hiven.js version: ^2.0.11
- Installed Node.js version: v14.17.0
- Operating system: Windows 10
Workaround
I've set the leave() function on https://github.com/hivenapp/hiven.js/blob/master/lib/Collections/House.ts to have a parameter called id
and then changed this.id
on the rest.delete() function to id
.
From
leave() {
return __awaiter(this, void 0, void 0, function* () {
// Leave the house
const leaveHouse = yield Client_1.rest.delete(`/users/@me/houses/${this.id}`);
return leaveHouse;
});
}
to
leave(id) {
return __awaiter(this, void 0, void 0, function* () {
// Leave the house
const leaveHouse = yield Client_1.rest.delete(`/users/@me/houses/${id}`);
return leaveHouse;
});
}
Metadata
Metadata
Assignees
Labels
No labels