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": "https://twitch.tv/yourname",
"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.14.tar.gz
(9.6 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.14.tar.gz.
File metadata
- Download URL: sxnre_rpc-1.0.14.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
533853cbd79eeb970826db4347a03b25b90e2182ab9cec199b4bf96996756904
|
|
| MD5 |
690ea002685c83494c3a595ecdd628af
|
|
| BLAKE2b-256 |
dc29211df22fcfc7ce96d0a11a97e15b6993f41d44fece456eca0e72a4907a6e
|
File details
Details for the file sxnre_rpc-1.0.14-py3-none-any.whl.
File metadata
- Download URL: sxnre_rpc-1.0.14-py3-none-any.whl
- Upload date:
- Size: 9.3 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 |
02b9cf37b0cfcde2a85a88ea35ef24c6e24187e8cb703d3ebb782ff9bd4e0575
|
|
| MD5 |
330a7ec1c61043116fddb1c2886bc69c
|
|
| BLAKE2b-256 |
272cd7c1911f0d21247e846f265b55f5533ca8d818b3c250294142b403882dbc
|