@ file : Suppress (" Remove Explicit Type Arguments ", Ġ" D uplicated Code ", Ġ" unused ", Ġ" Spell Checking Inspection ") Ċ Ċ package Ġapi . func Ċ Ċ import ĠApi Context Ċ import Ġapi . Delete Message Result Ċ import Ġapi . send Request Ċ import Ġapi . send Request Await Ċ import Ġapi . send Request Callback Ċ import Ġio . vertx . core . AsyncResult Ċ import Ġio . vertx . core . Future Ċ Ċ /** Ċ Ġ* ĠUse Ġthis Ġmethod Ġto Ġdelete Ġa Ġmessage , Ġincluding Ġservice Ġmessages , Ġwith Ġthe Ġfollowing Ġlimitations : Ċ Ġ* Ġ- ĠA Ġmessage Ġcan Ġonly Ġbe Ġdeleted Ġif Ġit Ġwas Ġsent Ġless Ġthan Ġ 4 8 Ġhours Ġago . Ċ Ġ* Ġ- ĠB ots Ġcan Ġdelete Ġoutgoing Ġmessages Ġin Ġprivate Ġch ats , Ġgroups , Ġand Ġsuper groups . Ċ Ġ* Ġ- ĠB ots Ġcan Ġdelete Ġincoming Ġmessages Ġin Ġprivate Ġch ats . Ċ Ġ* Ġ- ĠB ots Ġgranted Ġ* can _ post _ messages * Ġpermissions Ġcan Ġdelete Ġoutgoing Ġmessages Ġin Ġchannels . Ċ Ġ* Ġ- ĠIf Ġthe Ġbot Ġis Ġan Ġadministrator Ġof Ġa Ġgroup , Ġit Ġcan Ġdelete Ġany Ġmessage Ġthere . Ċ Ġ* Ġ- ĠIf Ġthe Ġbot Ġhas Ġ* can _ delete _ messages * Ġpermission Ġin Ġa Ġsuper group Ġor Ġa Ġchannel , Ġit Ġcan Ġdelete Ġany Ġmessage Ġthere . Ċ Ġ* ĠReturns Ġ* True * Ġon Ġsuccess . Ċ Ġ* Ċ Ġ* Ġ@ param [ chat Id ] ĠUnique Ġidentifier Ġfor Ġthe Ġtarget Ġchat Ġor Ġusername Ġof Ġthe Ġtarget Ġchannel Ġ( in Ġthe Ġformat Ġ`@ channel username `) Ċ Ġ* Ġ@ param [ message Id ] ĠIdentifier Ġof Ġthe Ġmessage Ġto Ġdelete Ċ Ġ*/ Ċ fun ĠApi Context . delete Message ( ĊĠĠĠ Ġchat Id : ĠString , ĊĠĠĠ ĠmessageId : ĠInt Ċ ): ĠFuture < Delete Message Result > Ġ= ĊĠĠĠ Ġsend Request < Delete Message Result >(" delete Message ", ĠlistOf ( Pair (" chat _ id ", Ġchat Id ), ĠPair (" message _ id ", ĠmessageId ))) Ċ Ċ fun ĠApi Context . delete Message ( ĊĠĠĠ Ġchat Id : ĠString , ĊĠĠĠ ĠmessageId : ĠInt , ĊĠĠĠ Ġcallback : Ġ( result : ĠAsync Result < Delete Message Result >) Ġ-> ĠUnit Ċ ): ĠApi Context Ġ= Ġsend Request Callback < Delete Message Result >( ĊĠĠĠ Ġ" delete Message ", ĊĠĠĠ ĠlistOf ( Pair (" chat _ id ", Ġchat Id ), ĠPair (" message _ id ", ĠmessageId )), ĊĠĠĠ Ġcallback Ċ ) Ċ Ċ suspend Ġfun ĠApi Context . delete Message Await ( ĊĠĠĠ Ġchat Id : ĠString , ĊĠĠĠ ĠmessageId : ĠInt Ċ ): ĠDelete Message Result Ġ= Ġsend Request Await < Delete Message Result >( ĊĠĠĠ Ġ" delete Message ", ĊĠĠĠ ĠlistOf ( Pair (" chat _ id ", Ġchat Id ), ĠPair (" message _ id ", ĠmessageId )) Ċ )