structures made async to be overrideable

This commit is contained in:
Skillz
2020-09-17 17:49:18 -04:00
parent f1cf073d2c
commit f3a113a6e3
17 changed files with 70 additions and 65 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ export async function getMessages(
endpoints.CHANNEL_MESSAGES(channelID),
options,
)) as MessageCreateOptions[];
return result.map((res) => structures.createMessage(res));
return Promise.all(result.map((res) => structures.createMessage(res)));
}
/** Get pinned messages in this channel. */
@@ -99,7 +99,7 @@ export async function getPins(channelID: string) {
const result = (await RequestManager.get(
endpoints.CHANNEL_PINS(channelID),
)) as MessageCreateOptions[];
return result.map((res) => structures.createMessage(res));
return Promise.all(result.map((res) => structures.createMessage(res)));
}
/** Send a message to the channel. Requires SEND_MESSAGES permission. */