UniqueBot python SDK
Project description
UBPY
UniqueBots 파이썬 비공식 SDK입니다.
공식 SDK- 출시되었습니다. URL
SaidBySolo님의 KoreanBots비공식 sdk레포의 일부를 사용해 제작되었습니다. URL
현재는 길드수업데이트, 투표여부 모듈만 존재합니다,
길드수업데이트 모듈은 자동으로 30분마다 자동으로 길드수를 비교해 요청을 보냅니다.
파이썬 3.6이상을 필요로 합니다.
pip install UBPY --upgrade
길드 수 업데이트
Use not Cogs
import discord
from discord.ext import commands
import UBPY
bot = commands.Bot(command_prefix='!')
#or
bot = discord.Client()
UBPY.Client(bot,token='UniqueBots TOKEN',bot_id="BOT ID")
@bot.event
async def on_ready():
print(f"{bot.user.name} 준비 완료.")
bot.run('Discord TOKEN')
Using Cogs
import UBPY
import discord
from discord.ext import commands
class GuildCount(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.token = "UniqueBots TOKEN"
self.id = "Bot ID"
UBPY.Client(self.bot,self.token,self.id)
def setup(bot):
bot.add_cog(GuildCount(bot))
유저 봇 투표여부
Cogs
import UBPY
import discord
from discord.ext import commands
class CheckVote(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.token = "UniqueBots TOKEN"
self.id = "Bot ID"
@commands.command(name="투표확인")
async def _checkvote(self,ctx):
VOTE = UBPY.UBPYvote(ctx, self.token, bot_id=self.id)
check = await VOTE.vote()
if check == True:
print('TRUE')
elif check == False:
print('FALSE')
else:
print('ERROR')
def setup(bot):
bot.add_cog(CheckVote(bot))
검색
cogs
import UBPY
import discord
from discord.ext import commands
class Search(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.token = "UniqueBots TOKEN"
@commands.command(name="봇리스트")
async def _searchlist(self,ctx,page=1):
"""
리스트에서 불러올수있는 봇정보:
tag, heartCount, discordVerified, guilds, id, status, brief, avatar, prefix, invite, locked, library
"""
ser = UBPY.UBPYsearch(self.token)
res = await ser.List(page)
if res == False:
print('error')
else:
for i in res:
print(i["tag"])
@commands.command(name="봇검색")
async def _searchlist(self,ctx,ID):
"""
불러올수있는 봇정보:
tag, heartCount, discordVerified, guilds, id, status, brief, avatar, prefix, invite, locked, library
"""
ser = UBPY.UBPYsearch(self.token)
res = await ser.search(ID=ID)
if res == False:
print('error')
else:
print(res["tag"])
def setup(bot):
bot.add_cog(Search(bot))
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
UBPY-3.2.tar.gz
(4.6 kB
view details)
Built Distribution
UBPY-3.2-py3-none-any.whl
(6.7 kB
view details)
File details
Details for the file UBPY-3.2.tar.gz
.
File metadata
- Download URL: UBPY-3.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca1e7594771b00d9ef2d0c1fa481f30050e1ef76c3ec5ea5f35a0a86b5d245a2 |
|
MD5 | 287ebe7b17636ed3d86c6212ac48cff4 |
|
BLAKE2b-256 | 5194ea8a162a9be97b03d960245c2eec3a4b7e5f0c440f0cf87be013427191bd |
File details
Details for the file UBPY-3.2-py3-none-any.whl
.
File metadata
- Download URL: UBPY-3.2-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 780e69ed6d2143528cce56d7ef03189715b0a447dfdf499d4109e50dbbe3b1bb |
|
MD5 | 361a94bbf87fb867c52d4141fbbe984d |
|
BLAKE2b-256 | 2e1391a265d035955ca11c5a575f19bc4d31dbc6b75d763930f0d774f22ba724 |