ValvePython / steam

☁️ Python package for interacting with Steam
http://steam.readthedocs.io
MIT License
1.06k stars 129 forks source link

send message not work #353

Closed UnderSpider closed 2 years ago

UnderSpider commented 2 years ago
from steam.client import SteamClient

client = SteamClient()
client.cli_login('username', 'password')
user = client.get_user(steam_id)
user.send_message('hello')

my account is logged in, but I didn't send any messages

rossengeorgiev commented 2 years ago

.send_message() only queues a message to be sent. Once you yield to the gevent event loop, it will get processed and sent. You can call client.idle(), or .sleep(t), or any call that block for io to yield to the event loop.

UnderSpider commented 2 years ago

thanks, it worked!