Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on_trade and on_trade_update not firing #594

Closed
3 tasks done
dermuedejones opened this issue Oct 29, 2024 · 2 comments
Closed
3 tasks done

on_trade and on_trade_update not firing #594

dermuedejones opened this issue Oct 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dermuedejones
Copy link

dermuedejones commented Oct 29, 2024

Summary

on_trade and on_trade_update event callbacks not called

Reproduction Steps

import steam


class MyClient(steam.Client):
    async def on_ready(self) -> None:
        print("Logged in as", self.user)

    async def on_trade(self, trade: steam.TradeOffer) -> None:
        if not trade.is_our_offer():
            await trade.user.send("Thank you for your trade")
            print(f"Received trade: #{trade.id}")
            print("Trade partner is:", trade.user)
            print("We would send:", len(trade.sending), "items")
            print("We would receive:", len(trade.receiving), "items")

            if trade.is_gift():
                print("Accepting the trade as it is a gift")
                await trade.accept()


client = MyClient()
client.run("username", "password")

I could reproduce it with the sample code from the Readme for 1.0.1 and installation from main.

Expected Results

on_trade and on_trade_update event callbacks being called

Actual Results

on_message callback with content [tradeoffer sender=1951**** id=750341****][/tradeoffer]

I also noticed sending a message with trade does not return the function call. But the trade goes out.
It might be related. It was the original problem I was debugging.

System Information

python version: 3.12.7
steam.py version: 1.0.1
aiohttp version: 3.10.10
betterproto version: 2.0.0b6
operating system info: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35

Checklist

  • I have searched the issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my username, password, shared/identity secrets and refresh/access tokens from display, if visible.
@dermuedejones dermuedejones added the bug Something isn't working label Oct 29, 2024
@Gobot1234
Copy link
Owner

should be fixed by #586

@Gobot1234
Copy link
Owner

Should now be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants