You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see you assigned this to me, can you clarify what needs to be changed? I might have misunderstood when I made my original comment. @thewilloftheshadow
Sure @apteryxxyz (I didn't assign it based on your comment fyi, just distributing issues)
Right now the channelFactory is a way to abstract out passing in an unknown channel type and get back the proper class, but its always typed as the BaseChannel making it not very useful for the end user (e.g. interaction.channel is always a BaseChannel)
There's either two ways of fixing this from what I see, but open to other ideas:
Have the channelFactory return more specific types by passing in the parameter somehow (not sure how to do this with an unknown APIChannel though)
Consolidate all the channels into one Channel class and then nullify the fields that don't apply to a particular channel type
Right now the channelFactory typings aren't great, you get a vague "This is a channel of some sort" bc it extends the BaseChannel, which isn't ideal.
Need to either find a better way to create channel classes or find a way to type the channelFactory's result
The text was updated successfully, but these errors were encountered: