PingPongBuilder Custom Api Module
Project description
PingPongWr
파이썬으로 제작된 핑퐁 빌더 Custom Api를 좀 더 쉽고 간편하게 사용할 수 있게 해주는 모듈입니다.
별도의 출처를 밝힐필요 없습니다.
Installing
# Linux/macOS
python3 -m pip install -U PingPongWr
# Windows
py -3 -m pip install -U PingPongWr
Quick Example
독자적 사용 예시
import PingPongWr # 메인 모듈
import asyncio # 비동기 실행을 위한 모듈
url = "커스텀 API 링크" # 핑퐁빌더 Custom API URL
pingpong_token = "인증 토큰" # 핑퐁빌더 Custom API Token
Ping = PingPongWr.Connect(url, pingpong_token) # 핑퐁 모듈 클래스 선언
async def Example(): # 비동기식 함수
str_text = input("나: ") # 대화할 말 입력받기
return_data = await Ping.Pong(session_id ="Example", text = str_text, topic = True, image = True, dialog = True) # 핑퐁빌더 API에 Post 요청
print(return_data) # {"text": "안녕안녕입니다", "topic": None, "Image": None}
asyncio.run(Example()) # 비동기로 함수 실행
Discord Example
디스코드에서 사용예시
import discord
import PingPongWr
from discord.ext import commands
bot = commands.Bot(command_prefix='>')
url = "커스텀 API 링크" # 핑퐁빌더 Custom API URL
pingpong_token = "인증 토큰" # 핑퐁빌더 Custom API Token
Ping = PingPongWr.Connect(url, pingpong_token) # 핑퐁 모듈 클래스 선언
@bot.event()
async def on_message(message):
if message.author == bot.user:
return
if message.content.startswith("봇"):
str_text = (message.content.split(" "))[1]
return_data = await Ping.Pong(session_id ="Example", text = str_text, topic = True, image = True, dialog = True) # 핑퐁빌더 API에 Post 요청
await message.channel.send(f"{message.author.mention}, {return_data["text"]}")
bot.run("token")
Links
Team. Warin Discord:https://discord.gg/cGM4PcHvQq
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
PingPongWr-0.0.9.tar.gz
(4.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 PingPongWr-0.0.9.tar.gz.
File metadata
- Download URL: PingPongWr-0.0.9.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9231e570cf8aad95fc3372b5f008ab5f22d0a2eb4139137ae1a57b1bd09b9f06
|
|
| MD5 |
09d1c1116ce750fbce53e02e571faa43
|
|
| BLAKE2b-256 |
bc96f2df7234a2962aada55682ec7ca023714b2e113fb963c9df7e1f10080f70
|
File details
Details for the file PingPongWr-0.0.9-py3-none-any.whl.
File metadata
- Download URL: PingPongWr-0.0.9-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
841e9e3488ecd219e788cbfcd7559ed26c4fc23b000fde7f8d5fe29fa7bc88c0
|
|
| MD5 |
40706e833372688709550cb80e671d2e
|
|
| BLAKE2b-256 |
6ff368b7645ce2568791af896a69716f127b7562c92a106341c607365e80d895
|