update readme
This commit is contained in:
parent
2b77b04008
commit
4860e117c7
5 changed files with 19 additions and 13 deletions
4
.github/readme-pl.md
vendored
4
.github/readme-pl.md
vendored
|
|
@ -34,8 +34,8 @@ jRandomSkills to plugin do CounterStrike 2, który wprowadza chaos i frajdę do
|
||||||
- **Chiński uproszczony** [GrokAI / ChatGPT]
|
- **Chiński uproszczony** [GrokAI / ChatGPT]
|
||||||
|
|
||||||
## 🖼️ Prezentacja Pluginu
|
## 🖼️ Prezentacja Pluginu
|
||||||

|

|
||||||

|

|

|
||||||

|
:
|
||||||
|
|
||||||
def get_discord_users(user_ids):
|
def get_discord_users(user_ids):
|
||||||
cells = []
|
cells = []
|
||||||
|
headers = {
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
||||||
|
}
|
||||||
|
|
||||||
for uid in user_ids:
|
for uid in user_ids:
|
||||||
try:
|
try:
|
||||||
response = requests.get(
|
response = requests.get(
|
||||||
f"https://pfpfinder.com/api/discord/user/{uid}", timeout=10
|
f"https://pfpfinder.com/api/discord/user/{uid}",
|
||||||
|
headers=headers,
|
||||||
|
timeout=10
|
||||||
)
|
)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
print(f"Discord API: Status {response.status_code} for {uid}")
|
print(f"Discord API: Status {response.status_code}")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
data = response.json()
|
data = response.json()
|
||||||
|
|
@ -127,8 +133,8 @@ def get_discord_users(user_ids):
|
||||||
if global_name:
|
if global_name:
|
||||||
name = global_name
|
name = global_name
|
||||||
else:
|
else:
|
||||||
print(f"Warning: {uid} has no global_name, falling back to username '{username}' (can be used for invites)")
|
print(f"Warning: {uid} has no global_name, falling back to username '{username}'")
|
||||||
name = username or f"User {uid}"
|
name = username
|
||||||
|
|
||||||
source_url = (data.get("avatar") or "").replace(".gif", ".png")
|
source_url = (data.get("avatar") or "").replace(".gif", ".png")
|
||||||
if not source_url:
|
if not source_url:
|
||||||
|
|
@ -144,7 +150,7 @@ def get_discord_users(user_ids):
|
||||||
cells.append(make_cell(avatar_url=avatar_url, name=name))
|
cells.append(make_cell(avatar_url=avatar_url, name=name))
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Discord API Error for {uid}: {e}")
|
print(f"Discord API Error: {e}")
|
||||||
|
|
||||||
return build_table(cells) if cells else ""
|
return build_table(cells) if cells else ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ jRandomSkills to plugin do CounterStrike 2, który wprowadza chaos i frajdę do
|
||||||
- **Chiński uproszczony** [GrokAI / ChatGPT]
|
- **Chiński uproszczony** [GrokAI / ChatGPT]
|
||||||
|
|
||||||
## 🖼️ Prezentacja Pluginu
|
## 🖼️ Prezentacja Pluginu
|
||||||

|

|
||||||

|

|

|
||||||

|
![Preview2](https://github.com/Juzlus/jRandomSkills/blob/main/.github/preview2.gif?raw=true
|
||||||
|
|
||||||
## 🌐 Test Server
|
## 🌐 Test Server
|
||||||
Join the 3v3 test server and try out the jRandomSkills plugin:
|
Join the 3v3 test server and try out the jRandomSkills plugin:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue