A Simple Python API wrapper for KoreanBots.
Project description
A Simple Python API wrapper for KoreanBots.
문서
설치
파이썬 3.6 혹은 그 이상이 필요합니다.
python3 -m pip install koreanbots
예시
서버수 업데이트하기
주기적으로 봇의 수를 업데이트합니다. (discord.py)
import discord
import koreanbots
client = discord.Client()
Bot = koreanbots.Client(client, 'KoreanBots 토큰')
@client.event
async def on_ready():
print(f'{client.user}로 로그인하였습니다.')
client.run('Discord 토큰')
아이디로 봇 정보 가져오기
discord.py 사용시
import discord
import koreanbots
client = discord.Client()
Bot = koreanbots.Client(client, 'KoreanBots 토큰')
@client.event
async def on_ready():
print(f'{client.user}로 로그인하였습니다.')
Data = await Bot.getBot('653534001742741552')
# 반환되는 데이터는 옆 링크를 참고해주세요: https://koreanbots.dev/js-sdk/interfaces/_types_.getbyid.html
print(Data)
client.run('Discord 토큰')
discord.py 미사용시
import koreanbots
import asyncio
loop = asyncio.get_event_loop()
Bot = koreanbots.HTTPClient('KoreanBots 토큰')
# getBot은 토큰이 필요하지 않기에 'KoreanBots 토큰' 부분은 생략 가능합니다.
Data = loop.run_until_complete(Bot.getBot('653534001742741552'))
# 반환되는 데이터는 옆 링크를 참고해주세요: https://koreanbots.dev/js-sdk/interfaces/_types_.getbyid.html
print(Data)
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
koreanbots-0.2.1-py3-none-any.whl
(11.7 kB
view hashes)
Close
Hashes for koreanbots-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31609f2cbe5d22ce57aebbc5ec1718023a46936c0668f6afbee462cef3f2d389 |
|
MD5 | 621ae4d3ac5bc98e303908fbbb15a861 |
|
BLAKE2b-256 | 94bd0301655cc1150f820d44d097c0b17df4eaf02e3f06bbda6b01bd3b6f7a75 |