yfoo Posted August 18, 2018 Share Posted August 18, 2018 I usually just pass the script reference to give my classes api method access, I learned how to do this from explv's tutorial. I also know that it is possible to get api method access by having the class extend MethodProvider (or API) and override exchangeContext with a call to super. The in onStart() call your class's inherited exchangeContext(). Looking at osbot source I think what this does is in your class, instantiate the inherited variables of Logger, Skills, Magic, Bank, etc... from the passed instance of bot. Which way should be used and why? Thanks. Quote Link to comment Share on other sites More sharing options...
Team Cape Posted August 18, 2018 Share Posted August 18, 2018 (edited) @PayPalMeRSGP From @Alek: Generally I do the same, though. It seems the SDN allows either or. Edited August 18, 2018 by Team Cape Quote Link to comment Share on other sites More sharing options...
Alek Posted August 18, 2018 Share Posted August 18, 2018 The instance is not the script, its bot. Quote Link to comment Share on other sites More sharing options...