calamity-0.1.14.5: A library for writing discord bots
Safe HaskellNone
LanguageHaskell2010

Calamity.Types.Upgradeable

Description

Things that can be upgraded from snowflakes to their full data

Synopsis

Documentation

class Upgradeable a ids | a -> ids, ids -> a where Source #

A typeclass that represents snowflakes that can be upgraded to their complete data, either through the cache or HTTP.

Methods

upgrade :: BotC r => ids -> Sem r (Maybe a) Source #

Upgrade a snowflake to it's complete data.

If it existed in the cache then it is returned from there, otherwise we fetch from HTTP and update the cache on success.

Instances

Instances details
Upgradeable Channel (Snowflake Channel) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: [(Type -> Type) -> Type -> Type]). BotC r => Snowflake Channel -> Sem r (Maybe Channel) Source #

Upgradeable Guild (Snowflake Guild) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: [(Type -> Type) -> Type -> Type]). BotC r => Snowflake Guild -> Sem r (Maybe Guild) Source #

Upgradeable User (Snowflake User) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: [(Type -> Type) -> Type -> Type]). BotC r => Snowflake User -> Sem r (Maybe User) Source #

Upgradeable GuildChannel (Snowflake GuildChannel) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: [(Type -> Type) -> Type -> Type]). BotC r => Snowflake GuildChannel -> Sem r (Maybe GuildChannel) Source #

Upgradeable Member (Snowflake Guild, Snowflake Member) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: [(Type -> Type) -> Type -> Type]). BotC r => (Snowflake Guild, Snowflake Member) -> Sem r (Maybe Member) Source #

Upgradeable Emoji (Snowflake Guild, Snowflake Emoji) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: [(Type -> Type) -> Type -> Type]). BotC r => (Snowflake Guild, Snowflake Emoji) -> Sem r (Maybe Emoji) Source #