Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.33k stars 910 forks source link

Switch to use CallbackManager.Subscribe #777

Open WildCard65 opened 9 years ago

WildCard65 commented 9 years ago

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

scholtzm commented 9 years ago

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

bartico6 commented 9 years ago

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

WildCard65 commented 9 years ago

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 commented 9 years ago

@bartico6 I'll do the PR for this.

bartico6 commented 9 years ago

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.

WildCard65 commented 9 years ago

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

WildCard65 commented 9 years ago

Updated issue to reflect release of SteamKit 1.6.4

jaddie commented 8 years ago

Did this ever get implemented?

doktokto commented 8 years ago

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.

WildCard65 commented 8 years ago

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 notifications@github.com 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 .

dragonblade62 commented 8 years ago

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

Cristaling commented 8 years ago

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?

WildCard65 commented 8 years ago

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

fjch1997 commented 8 years ago

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.

waylaidwanderer commented 8 years ago

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

fjch1997 commented 8 years ago

@waylaidwanderer

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