force Channel type on message.channel

This commit is contained in:
Skillz
2020-04-27 18:43:33 -04:00
parent b2af730bec
commit d94905af00

View File

@@ -17,7 +17,7 @@ export function createMessage(data: MessageCreateOptions) {
author: createUser({ ...data.author, avatar: data.author.avatar || "" }),
timestamp: Date.parse(data.timestamp),
editedTimestamp: data.edited_timestamp ? Date.parse(data.edited_timestamp) : undefined,
channel: cache.channels.get(data.channel_id),
channel: cache.channels.get(data.channel_id)!,
/** Delete a message */
delete: (reason?: string) => {