simmsb/calamity

No way to upgrade Snowflake VoiceChannel to VoiceChannel

Innf107 opened this issue · 1 comments

It seens like it's currently impossible to upgrade Snowflake VoiceChannel to VoiceChannel.
Sorry, if I just missed the intended solution.
My workaround so far was to create my own orphan instance

instance Upgradeable VoiceChannel (Snowflake VoiceChannel) where
    upgrade s = upgrade (coerceSnowflake @_ @Channel s) <&> \case
            Just (GuildChannel' (GuildVoiceChannel vc)) -> Just vc
            _ -> Nothing

Yeah the current way is probably to do that, adding Upgradeable instances for all the channel types would definitely be useful though