From afb3dc6d67f2f22dc10452d288173bc13f207c82 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 29 May 2023 11:48:41 +0000 Subject: automatic import of python-ubpy --- .gitignore | 1 + python-ubpy.spec | 508 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 510 insertions(+) create mode 100644 python-ubpy.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..2be10a9 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/UBPY-4.2.tar.gz diff --git a/python-ubpy.spec b/python-ubpy.spec new file mode 100644 index 0000000..cbd388a --- /dev/null +++ b/python-ubpy.spec @@ -0,0 +1,508 @@ +%global _empty_manifest_terminate_build 0 +Name: python-UBPY +Version: 4.2 +Release: 1 +Summary: UniqueBot python SDK +License: MIT +URL: https://github.com/popop098/UBPY +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/1e/2f/458b3245a2999de7ddb3c0b962b78f64bb9b80fab74c204af55515531ad4/UBPY-4.2.tar.gz +BuildArch: noarch + +Requires: python3-aiohttp + +%description +# UBPY +# UniqueBots 파이썬 **비공식** SDK입니다. +# 공식 SDK- 출시되었습니다. [URL]() +### SaidBySolo님의 KoreanBots비공식 sdk레포의 일부를 사용해 제작되었습니다. [URL]() + +### 현재는 길드수업데이트, 투표여부 모듈만 존재합니다, +### 길드수업데이트 모듈은 자동으로 30분마다 자동으로 길드수를 비교해 요청을 보냅니다. + +### 파이썬 3.6이상을 필요로 합니다. + +``` +pip install UBPY --upgrade +``` + +## 길드 수 업데이트 + +**Use not Cogs** +```py +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** +```py +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** +```py +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** +```py +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, description + """ + 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, description + """ + ser = UBPY.UBPYsearch(self.token) + res = await ser.search(ID=ID) + if res == False: + print('error') + else: + print(res["tag"]) + + @commands.command(name="유저검색") + async def _searchlist(self,ctx,ID,page=1): + """ + 불러올수있는 봇정보: + tag, heartCount, discordVerified, guilds, id, + status, brief, avatar, prefix, invite, locked, library, description + """ + ser = UBPY.UBPYsearch(self.token) + res = await ser.searchuser(ID=ID,page) + if res == False: + print('error') + else: + for i in res: + print(i["tag"]) + + +def setup(bot): + bot.add_cog(Search(bot)) +``` + + + +%package -n python3-UBPY +Summary: UniqueBot python SDK +Provides: python-UBPY +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-UBPY +# UBPY +# UniqueBots 파이썬 **비공식** SDK입니다. +# 공식 SDK- 출시되었습니다. [URL]() +### SaidBySolo님의 KoreanBots비공식 sdk레포의 일부를 사용해 제작되었습니다. [URL]() + +### 현재는 길드수업데이트, 투표여부 모듈만 존재합니다, +### 길드수업데이트 모듈은 자동으로 30분마다 자동으로 길드수를 비교해 요청을 보냅니다. + +### 파이썬 3.6이상을 필요로 합니다. + +``` +pip install UBPY --upgrade +``` + +## 길드 수 업데이트 + +**Use not Cogs** +```py +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** +```py +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** +```py +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** +```py +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, description + """ + 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, description + """ + ser = UBPY.UBPYsearch(self.token) + res = await ser.search(ID=ID) + if res == False: + print('error') + else: + print(res["tag"]) + + @commands.command(name="유저검색") + async def _searchlist(self,ctx,ID,page=1): + """ + 불러올수있는 봇정보: + tag, heartCount, discordVerified, guilds, id, + status, brief, avatar, prefix, invite, locked, library, description + """ + ser = UBPY.UBPYsearch(self.token) + res = await ser.searchuser(ID=ID,page) + if res == False: + print('error') + else: + for i in res: + print(i["tag"]) + + +def setup(bot): + bot.add_cog(Search(bot)) +``` + + + +%package help +Summary: Development documents and examples for UBPY +Provides: python3-UBPY-doc +%description help +# UBPY +# UniqueBots 파이썬 **비공식** SDK입니다. +# 공식 SDK- 출시되었습니다. [URL]() +### SaidBySolo님의 KoreanBots비공식 sdk레포의 일부를 사용해 제작되었습니다. [URL]() + +### 현재는 길드수업데이트, 투표여부 모듈만 존재합니다, +### 길드수업데이트 모듈은 자동으로 30분마다 자동으로 길드수를 비교해 요청을 보냅니다. + +### 파이썬 3.6이상을 필요로 합니다. + +``` +pip install UBPY --upgrade +``` + +## 길드 수 업데이트 + +**Use not Cogs** +```py +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** +```py +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** +```py +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** +```py +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, description + """ + 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, description + """ + ser = UBPY.UBPYsearch(self.token) + res = await ser.search(ID=ID) + if res == False: + print('error') + else: + print(res["tag"]) + + @commands.command(name="유저검색") + async def _searchlist(self,ctx,ID,page=1): + """ + 불러올수있는 봇정보: + tag, heartCount, discordVerified, guilds, id, + status, brief, avatar, prefix, invite, locked, library, description + """ + ser = UBPY.UBPYsearch(self.token) + res = await ser.searchuser(ID=ID,page) + if res == False: + print('error') + else: + for i in res: + print(i["tag"]) + + +def setup(bot): + bot.add_cog(Search(bot)) +``` + + + +%prep +%autosetup -n UBPY-4.2 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-UBPY -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 29 2023 Python_Bot - 4.2-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..e8a1c9f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +c6988929be9dd00839263614d4929125 UBPY-4.2.tar.gz -- cgit v1.2.3