SteamBot icon indicating copy to clipboard operation
SteamBot copied to clipboard

Switch to use CallbackManager.Subscribe

Open WildCard65 opened this issue 9 years ago • 16 comments

With SteamKit 1.6.4 released, it deprecates the api SteamBot uses atm.

WildCard65 avatar Jul 18 '15 13:07 WildCard65

Personally, I don't use SteamBot anymore but of course update seems to be inevitable.

scholtzm avatar Jul 18 '15 18:07 scholtzm

The changes are not as hard to implement as it seems - and it looks a bit cleaned up too. So, before: Before And after: After If someone could teach me "how do I PR [without making myself look like a complete idiot]" then I'll issue a PR today or tomorrow that'll prevent SteamBot from dying when the changes take effect. Here's my steam profile: Akashiya Moka - if one of you has what it takes to introduce a complete GitHub noob to PRs and stuff - 'pls' teach. :3

bartico6 avatar Jul 19 '15 15:07 bartico6

You don't need to store the callback instance in a variable as it won't be GC'd instantly as it internally registers itself with the callback manager.

WildCard65 avatar Jul 19 '15 16:07 WildCard65

@bartico6 I'll do the PR for this.

WildCard65 avatar Jul 19 '15 16:07 WildCard65

I'm aware of that, the variable for it was "out of being used to registering everything" and I noticed this right after posting the screenshot.

bartico6 avatar Jul 19 '15 16:07 bartico6

Ok quick update for anyone who isn't following the SteamKit2 issue referenced. CallbackManager.Subscribe is coming for 1.6.4 of SteamKit2

WildCard65 avatar Aug 02 '15 11:08 WildCard65

Updated issue to reflect release of SteamKit 1.6.4

WildCard65 avatar Aug 03 '15 10:08 WildCard65

Did this ever get implemented?

jaddie avatar Feb 14 '16 09:02 jaddie

SteamKit 1.6.5: 'CallbackMsgExtensions.Handle<T>(ICallbackMsg, Action<T>)" 'This method will be removed in a future version of SteamKit. Please migrate to CallbackManager.' ExampleBot SteamBot\Bot.cs 448

If you update SteamKit to 1.7.0 - there is errors that "Handle" is not exist.

doktokto avatar Feb 18 '16 12:02 doktokto

Ya, latest steamkit version removed anything not needed but left CallbackManager.Subscribe as the only method to use.

This email has been sent from a virus-free computer protected by Avast. www.avast.com https://www.avast.com/sig-email <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Feb 18, 2016 at 7:40 AM, doktokto [email protected] wrote:

SteamKit 1.6.5: 'CallbackMsgExtensions.Handle(ICallbackMsg, Action)" 'This method will be removed in a future version of SteamKit. Please migrate to CallbackManager.' ExampleBot SteamBot\Bot.cs 448

If you update SteamKit to 1.7.0 - there is errors that "Handle" is not exist.

— Reply to this email directly or view it on GitHub https://github.com/Jessecar96/SteamBot/issues/777#issuecomment-185703611 .

WildCard65 avatar Feb 18 '16 14:02 WildCard65

Can we please migrate ICallbackmsg to CallbackManager? It has been almost 1 and a half months o.0

dragonblade62 avatar Mar 31 '16 01:03 dragonblade62

I was able to do my migration to Subscribe myself, however I don't understand how I'm supposed to implement external Callbacks like "SteamNotifications.NotificationCallback" into SteamKit. Anyone managed that?

Cristaling avatar Apr 01 '16 15:04 Cristaling

@Cristaling Migrate it like you do with the other callbacks.

WildCard65 avatar Apr 01 '16 17:04 WildCard65

I'm currently working on a PR for this. My application needs to run on VPS but there is a bug in SteamKit causing error until 1.7. So it's kind of a must-have for me. I will also fully test it in a production environment before a PR is created.

fjch1997 avatar Jun 23 '16 14:06 fjch1997

@fjch1997 I haven't had any issues running it in a VPS. Try the mono-devel package instead of the default mono package.

waylaidwanderer avatar Jun 23 '16 15:06 waylaidwanderer

@waylaidwanderer

Well, it seems that some virtual machines are fine. The related SteamKit issue is https://github.com/SteamRE/SteamKit/issues/200

fjch1997 avatar Jun 23 '16 15:06 fjch1997