TheByKotik / sbpp_discord

Listens forwards of bans, comms, reports and sends it to Discord webhooks.
https://sbpp.github.io
GNU General Public License v3.0
1 stars 0 forks source link

Implement steam profile picture in webhook #15

Open crashzk opened 1 year ago

crashzk commented 1 year ago

@TheByKotik when we apply a bans on a player or even a comms when sending the message to discord it shows a sourcebans logo.

image

I was wondering, would it be possible to implement the steam profile picture of the player who was banned, and also the steam profile picture of the player who applied the ban?

Same thing for the reports channel webhook, add the steam profile picture of the player who reported it and the steam profile picture of the person who received the report.

TheByKotik commented 1 year ago

We have some trouble with it Steam API haven't neither standard URLs like https://steamcommunity.com/profiles/76561198088290585/avatarFull nor public api to access account data (GetPlayerSummaries requires api key) Why not use api key? Answer: You are limited to one hundred thousand (100,000) calls to the Steam Web API per day. It's easy to check that you won't exceed the limit when you use api key in one place (it's enough to limit requests to 1 per second) but it becomes more difficult if you have more than one server Okay, we can parse xml like https://steamcommunity.com/profiles/76561198088290585/?xml=1 But I'm not sure how Valve will take it

crashzk commented 1 year ago

I understand, in any case leave this suggestion here in case anyone can help with this feature and thanks for the feedback.

crashzk commented 1 year ago

@TheByKotik I've been doing a search on the Steam XML option you mentioned.

https://partner.steamgames.com/documentation/community_data

In case this method would be obsolete but working, then would it be possible to do with it and recover the profile image using avatarFull?

In this case, I didn't find any rules on how it should be used, better, limit of use and such.