Skip to main content

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


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.12.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sxnre_rpc-1.0.12-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file sxnre_rpc-1.0.12.tar.gz.

File metadata

  • Download URL: sxnre_rpc-1.0.12.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

Hashes for sxnre_rpc-1.0.12.tar.gz
Algorithm Hash digest
SHA256 489adba85e0021fe5d69063ca55694487e93f2bc1485f46d93cb6eb4bb1bba38
MD5 eb19e9eb02d366af28f51efaea308d3d
BLAKE2b-256 c03c5e7500e9ed13405a446cdcc5d21d826d768f9b2dcc304b273345513e001d

See more details on using hashes here.

File details

Details for the file sxnre_rpc-1.0.12-py3-none-any.whl.

File metadata

  • Download URL: sxnre_rpc-1.0.12-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

Hashes for sxnre_rpc-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 0a9c97596d430346c5f4c9f6ea43fa5e9e1731473c24891d1104786ba128cde2
MD5 07ba94c10ab9711d94684721f83643bd
BLAKE2b-256 8a2c31ed93064c85fd189de612822c538f32f7ce1f4a61e9a25ba860ce8e3be5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page