TypeScript type error
Hi guys! I have a type error where I'm at a loss on how to proceed.
I'm writing a discord bot that fetches messages in a channel, filters them, and then transforms the data for my backend models.
Please see an example of the filter function:
I'm filtering for 3 things:
1) if the message is a text message,
2) if the message is written by a user,
3) if the message contains a specific reaction
Here is the
As you can see, I'm checking to see if the message contains a specific reaction via
The issue is when I go to mutate my data.
I'm writing a discord bot that fetches messages in a channel, filters them, and then transforms the data for my backend models.
Please see an example of the filter function:
I'm filtering for 3 things:
1) if the message is a text message,
2) if the message is written by a user,
3) if the message contains a specific reaction
Here is the
getMessageReaction() method:As you can see, I'm checking to see if the message contains a specific reaction via
filter and returning null if not.The issue is when I go to mutate my data.
