package Ġme . de pr il ula 2 8 . discord proxy kt . entities . discord . channel čĊč Ċ import Ġkotlinx . serialization . json . JsonArray č Ċ import Ġkotlinx . serialization . json . JsonObject č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . builder . Message Builder č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . builder . Message Conversion č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . entities . Partial Entity č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . entities . Snow flake č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . entities . Timestamp č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . entities . discord . message . Emoji č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . entities . discord . message . Message č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . entities . discord . message . Partial Message č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . rest . I Rest Action č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . rest . Pag inated Action č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . rest . Rest Action č Ċ import Ġme . de pr il ula 2 8 . discord proxy kt . rest . Rest Endpoint čĊč Ċ /** čĊ Ġ* ĠThis Ġtype Ġis Ġused Ġfor Ġoperations Ġwhen Ġan ĠID Ġof Ġa Ġ[ Message Channel ] Ġis Ġknown .< br > čĊ Ġ* ĠMessage Ġchild Ġimplementations : čĊ Ġ* Ġ- ĠIn Ġguild s : Ġ[ Text Channel ] Ġand Ġan Ġin her itor Ġ[ News Channel ], čĊ Ġ* Ġ- ĠIn ĠD Ms : Ġ[ Private Channel ] čĊ Ġ*/ č Ċ interface ĠPartial Message Channel : ĠPartial Entity , ĠChannel Ġ{ čĊĠĠĠ Ġfun Ġfetch Message ( message : ĠSnow flake ): ĠPartial Message Ġ= ĠPartial Message . new ( this , Ġmessage ) čĊĠĠĠĠčĊĠĠĠ Ġval Ġfetch P ins : ĠRest Action < List < Message >> čĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġbot . request ( Rest Endpoint . GET _ PIN N ED _ MESSAGES . path ( snow flake . id ), Ġ{ Ġ( this Ġas ĠJson Array ). map Ġ{ čĊĠĠĠĠĠĠĠĠĠĠĠ ĠMessage ( it Ġas ĠJsonObject , Ġbot ) čĊĠĠĠĠĠĠĠ Ġ} Ġ}) čĊĠĠĠĠčĊĠĠĠ Ġval Ġfetch Messages : ĠPag inated Action < Message > čĊĠĠĠĠĠĠĠ Ġget () Ġ= ĠPag inated Action ( čĊĠĠĠĠĠĠĠĠĠĠĠ Ġbot , čĊĠĠĠĠĠĠĠĠĠĠĠ ĠRest Endpoint . GET _ CHANNEL _ MESSAGES , Ġsnow flake . id , čĊĠĠĠĠĠĠĠ Ġ) Ġ{ ĠMessage ( this Ġas ĠJsonObject , Ġbot ) Ġ} čĊĠĠĠĠčĊĠĠĠ Ġfun Ġtyping () Ġ= Ġbot . request ( Rest Endpoint . TRIGGER _ TY PING _ IND IC ATOR . path ( snow flake . id ), Ġ{ ĠUnit Ġ}) čĊĠĠĠĠčĊĠĠĠ Ġfun Ġsend ( message : ĠMessage Conversion ): ĠI Rest Action < Message > čĊĠĠĠĠĠĠĠ Ġ= Ġbot . request ( Rest Endpoint . CREATE _ MESSAGE . path ( snow flake . id ), Ġ{ ĠMessage ( this Ġas ĠJsonObject , Ġbot ) Ġ}) Ġ{ čĊĠĠĠĠĠĠĠĠĠĠĠ Ġmessage . to Message ( it ) čĊĠĠĠĠĠĠĠ Ġ} čĊĠĠĠĠčĊĠĠĠ Ġfun Ġsend ( content : ĠString ) Ġ= Ġsend ( Message Builder (). setContent ( content )) čĊĠĠĠĠčĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch P ins ")) čĊĠĠĠ Ġfun Ġretrieve Pin ned Messages () Ġ= Ġfetch P ins čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" typing () ")) čĊĠĠĠ Ġfun Ġsend Typing () Ġ= Ġtyping () čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" send ( text ) ")) čĊĠĠĠ Ġfun ĠsendMessage ( text : ĠString ) Ġ= Ġsend ( text ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" send ( embed ) ")) čĊĠĠĠ Ġfun ĠsendMessage ( message : ĠMessage Conversion ) Ġ= Ġsend ( message ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" send ( String . format ( format , Ġargs )) ")) čĊĠĠĠ Ġfun ĠsendMessage Format ( format : ĠString , Ġvar arg Ġargs : ĠString ) Ġ= Ġsend ( String . format ( format , Ġargs )) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id )). edit ( text ) ")) čĊĠĠĠ Ġfun Ġedit Message ById ( id : ĠString , Ġtext : ĠString ) Ġ= Ġfetch Message ( Snow flake ( id )). edit ( text ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id )). edit ( text ) ")) čĊĠĠĠ Ġfun Ġedit Message ById ( id : ĠLong , Ġtext : ĠString ) Ġ= Ġfetch Message ( Snow flake ( id . toString ())). edit ( text ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id . toString ())). edit ( message ) ")) čĊĠĠĠ Ġfun Ġedit Message ById ( id : ĠString , Ġmessage : ĠMessage Conversion ) Ġ= Ġfetch Message ( Snow flake ( id )). edit ( message ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id . toString ())). edit ( message ) ")) čĊĠĠĠ Ġfun Ġedit Message ById ( id : ĠLong , Ġmessage : ĠMessage Conversion ) Ġ= Ġfetch Message ( Snow flake ( id . toString ())). edit ( message ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id )). edit ( String . format ( format , Ġargs )) ")) čĊĠĠĠ Ġfun Ġedit Message Format ById ( id : ĠString , Ġformat : ĠString , Ġvar arg Ġargs : ĠString ) Ġ= Ġfetch Message ( Snow flake ( id )). edit ( String . format ( format , Ġargs )) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id . toString ())). edit ( String . format ( format , Ġargs )) ")) čĊĠĠĠ Ġfun Ġedit Message Format ById ( id : ĠLong , Ġformat : ĠString , Ġvar arg Ġargs : ĠString ) Ġ= Ġfetch Message ( Snow flake ( id . toString ())). edit ( String . format ( format , Ġargs )) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id )) ")) čĊĠĠĠ Ġfun Ġretrieve Message ById ( id : ĠString ) Ġ= Ġfetch Message ( Snow flake ( id )) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id . toString ())) ")) čĊĠĠĠ Ġfun Ġretrieve Message ById ( id : ĠLong ) Ġ= Ġfetch Message ( Snow flake ( id . toString ())) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id )). delete () ")) čĊĠĠĠ Ġfun Ġdelete Message ById ( id : ĠString ) Ġ= Ġfetch Message ( Snow flake ( id )). delete () čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id . toString ())). delete () ")) čĊĠĠĠ Ġfun Ġdelete Message ById ( id : ĠLong ) Ġ= Ġfetch Message ( Snow flake ( id . toString ())). delete () čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id )). pin () ")) čĊĠĠĠ Ġfun Ġpin Message ById ( id : ĠString ) Ġ= Ġfetch Message ( Snow flake ( id )). pin () čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id . toString ())). pin () ")) čĊĠĠĠ Ġfun Ġpin Message ById ( id : ĠLong ) Ġ= Ġfetch Message ( Snow flake ( id . toString ())). pin () čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id )). un pin () ")) čĊĠĠĠ Ġfun Ġun pin Message ById ( id : ĠString ) Ġ= Ġfetch Message ( Snow flake ( id )). un pin () čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( id . toString ())). un pin () ")) čĊĠĠĠ Ġfun Ġun pin Message ById ( id : ĠLong ) Ġ= Ġfetch Message ( Snow flake ( id . toString ())). un pin () čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message )). add Reaction ( em ote ) ")) čĊĠĠĠ Ġfun Ġadd Reaction ById ( message : ĠString , Ġem ote : ĠString ) Ġ= Ġfetch Message ( Snow flake ( message )). add Reaction ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message )). add Reaction ( em ote ) ")) čĊĠĠĠ Ġfun Ġadd Reaction ById ( message : ĠString , Ġem ote : ĠEmoji ) Ġ= Ġfetch Message ( Snow flake ( message )). add Reaction ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message . toString ())). add Reaction ( em ote ) ")) čĊĠĠĠ Ġfun Ġadd Reaction ById ( message : ĠLong , Ġem ote : ĠString ) Ġ= Ġfetch Message ( Snow flake ( message . toString ())). add Reaction ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message . toString ())). add Reaction ( em ote ) ")) čĊĠĠĠ Ġfun Ġadd Reaction ById ( message : ĠLong , Ġem ote : ĠEmoji ) Ġ= Ġfetch Message ( Snow flake ( message . toString ())). add Reaction ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message )). remove Reaction ( em ote ) ")) čĊĠĠĠ Ġfun Ġremove Reaction ById ( message : ĠString , Ġem ote : ĠString ) Ġ= Ġfetch Message ( Snow flake ( message )). remove Reaction ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message )). remove Reaction ( em ote ) ")) čĊĠĠĠ Ġfun Ġremove Reaction ById ( message : ĠString , Ġem ote : ĠEmoji ) Ġ= Ġfetch Message ( Snow flake ( message )). remove Reaction ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message . toString ())). remove Reaction ( em ote ) ")) čĊĠĠĠ Ġfun Ġremove Reaction ById ( message : ĠLong , Ġem ote : ĠString ) Ġ= Ġfetch Message ( Snow flake ( message . toString ())). remove Reaction ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message . toString ())). remove Reaction ( em ote ) ")) čĊĠĠĠ Ġfun Ġremove Reaction ById ( message : ĠLong , Ġem ote : ĠEmoji ) Ġ= Ġfetch Message ( Snow flake ( message . toString ())). remove Reaction ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message )). fetch Re actions ( em ote ) ")) čĊĠĠĠ Ġfun Ġretrieve Reaction Users ById ( message : ĠString , Ġem ote : ĠEmoji ) Ġ= Ġfetch Message ( Snow flake ( message )). fetch Re actions ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message )). fetch Re actions ( em ote ) ")) čĊĠĠĠ Ġfun Ġretrieve Reaction Users ById ( message : ĠString , Ġem ote : ĠString ) Ġ= Ġfetch Message ( Snow flake ( message )). fetch Re actions ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message . toString ())). fetch Re actions ( em ote ) ")) čĊĠĠĠ Ġfun Ġretrieve Reaction Users ById ( message : ĠLong , Ġem ote : ĠEmoji ) Ġ= Ġfetch Message ( Snow flake ( message . toString ())). fetch Re actions ( em ote ) čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" fetch Message ( Snow flake ( message . toString ())). fetch Re actions ( em ote ) ")) čĊĠĠĠ Ġfun Ġretrieve Reaction Users ById ( message : ĠLong , Ġem ote : ĠString ) Ġ= Ġfetch Message ( Snow flake ( message . toString ())). fetch Re actions ( em ote ) č Ċ } čĊč Ċ interface ĠMessage Channel Ġ{ čĊĠĠĠ Ġ/** čĊĠĠĠĠ Ġ* Ġwhen Ġthe Ġlast Ġpinned Ġmessage Ġwas Ġpinned . ĠThis Ġmay Ġbe Ġnull Ġin Ġevents Ġsuch Ġas ĠGU ILD _ CREATE Ġwhen Ġa Ġmessage Ġis Ġnot Ġpinned . čĊĠĠĠĠ Ġ*/ čĊĠĠĠ Ġval Ġlast Pin Timestamp : ĠTimestamp ? čĊĠĠĠĠčĊĠĠĠ Ġ/** čĊĠĠĠĠ Ġ* Ġthe Ġid Ġof Ġthe Ġlast Ġmessage Ġsent Ġin Ġthis Ġchannel Ġ( may Ġnot Ġpoint Ġto Ġan Ġexisting Ġor Ġvalid Ġmessage ) čĊĠĠĠĠ Ġ*/ čĊĠĠĠ Ġval Ġlast Message : ĠPartial Message čĊĠĠĠĠčĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠField ", ĠReplace With (" last Message . snow flake . id ")) čĊĠĠĠ Ġval Ġlatest MessageId : ĠString čĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġlast Message . snow flake . id čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠField ", ĠReplace With (" last Message . snow flake . id Long ")) čĊĠĠĠ Ġval Ġlatest MessageId Long : ĠLong čĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġlast Message . snow flake . id Long čĊĠĠĠ Ġ@ Deprecated (" J DA ĠCompatibility ĠFunction ", ĠReplace With (" true ")) čĊĠĠĠ Ġfun Ġhas Latest Message () Ġ= Ġtrue č Ċ } čĊ