Simple Discord Rich Presence RPC library for Python
Project description
sxnre-rpc
Discord RPC 모듈 - WebSocket을 통한 Rich Presence 관리
📦 설치
pip install sxnre-rpc
🚀 사용법
기본 사용
from sxnre_rpc import RPCManager, RPCConfig, RPCUser
# 설정
CONFIG: RPCConfig = {
"RESTART_INTERVAL_MS": 10 * 60 * 1000, # 10분
"STATUS_CHECK_INTERVAL_MS": 60 * 1000, # 1분
"LOGIN_RETRIES": 3,
"LOGIN_RETRY_DELAY_MS": 5000,
}
# 사용자 데이터
USERS: list[RPCUser] = [
{
"userID": "YOUR_USER_ID",
"token": "YOUR_DISCORD_TOKEN",
"name": "사용자 이름",
"type": "PLAYING",
"url": "트위치 프로필 링크
"state": "상태 텍스트",
"details": "상세 정보",
"large_image": "",
"largete": "",
"small_image": "",
"smallte": "",
"button1": "",
"button1link": "",
"button2": "",
"button2link": "",
},
]
# 실행
if __name__ == "__main__":
manager = RPCManager(config=CONFIG, users=USERS)
manager.run()
✨ 기능
- WebSocket을 통한 Discord RPC 관리
- 여러 사용자(클라이언트) 동시 처리
- 자동 재시작 시스템
- 상태 체크 루프
- 로그인 재시도 로직
⚙️ 요구사항
- Python 3.7 이상
- websocket-client >= 1.6.0
📜 라이선스
MIT License
🤝 기여
이슈 및 Pull Request를 환영합니다!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sxnre_rpc-1.0.1.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sxnre_rpc-1.0.1.tar.gz.
File metadata
- Download URL: sxnre_rpc-1.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a4a6357b47770f8c51f7a8de18b56f41e1759f520aae0490f7447c3c32f38c9
|
|
| MD5 |
418ab0c2dc30496230df6732ca0933cb
|
|
| BLAKE2b-256 |
1852987fdba97f4d19b6ee4818d12c453a4eb65841d8bdd0a516b7e65ab2d50a
|
File details
Details for the file sxnre_rpc-1.0.1-py3-none-any.whl.
File metadata
- Download URL: sxnre_rpc-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45af06e7a90b360d021343e8083af0e7f4ce8d964a95fb898abae51dac045205
|
|
| MD5 |
4f2b40d8cb0b9ada93c2c678fed4c476
|
|
| BLAKE2b-256 |
73057d8539deb1d959a9a249d09fb6c6ca70744eef1a4fb1bee9332471152c5e
|