calamity-0.8.0.0: A library for writing discord bots in haskell
Safe HaskellSafe-Inferred
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 its 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 :: EffectRow). BotC r => Snowflake Channel -> Sem r (Maybe Channel) Source #

Upgradeable DMChannel (Snowflake DMChannel) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). BotC r => Snowflake DMChannel -> Sem r (Maybe DMChannel) Source #

Upgradeable GroupChannel (Snowflake GroupChannel) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). BotC r => Snowflake GroupChannel -> Sem r (Maybe GroupChannel) Source #

Upgradeable GuildChannel (Snowflake GuildChannel) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

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

Upgradeable Category (Snowflake Category) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). BotC r => Snowflake Category -> Sem r (Maybe Category) Source #

Upgradeable TextChannel (Snowflake TextChannel) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). BotC r => Snowflake TextChannel -> Sem r (Maybe TextChannel) Source #

Upgradeable VoiceChannel (Snowflake VoiceChannel) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). BotC r => Snowflake VoiceChannel -> Sem r (Maybe VoiceChannel) Source #

Upgradeable Guild (Snowflake Guild) Source # 
Instance details

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). 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 :: EffectRow). BotC r => Snowflake User -> Sem r (Maybe User) Source #

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

Defined in Calamity.Types.Upgradeable

Methods

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

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

Defined in Calamity.Types.Upgradeable

Methods

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

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

Defined in Calamity.Types.Upgradeable

Methods

upgrade :: forall (r :: EffectRow). BotC r => (Snowflake Guild, Snowflake Role) -> Sem r (Maybe Role) Source #