| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
자동으로 루프를 돕니다 task.loop를 안만드셔도됩니다. (30분)
길드수도 안에서 체크합니다. 따로 비교안하셔도됩니다.
따로 루프를 만드시고싶으시다면 클래스내에 post_guild_count 라는 함수가 있습니다.
pip install dbkrpypip install --upgrade dbkrpy불러올수 있는 항목 입니다.
봇개발자,카테고리는 리스트로 반환됩니다.
해당유저의 투표여부를 bool형식(True,False)로 반환합니다.
불러올수 있는 항목 입니다.
전부 리스트로 반환됩니다.
#Auto Loop
import dbkrpy
import discord
from discord.ext import commands
class GuildCount(commands.Cog):
def __init__(self, bot):
bot = bot
token = 'DBKR Token paste here'
dbkrpy.UpdateGuild(bot,token)
def setup(bot):
bot.add_cog(GuildCount(bot))#Auto Loop
import discord
from discord.ext import commands
import dbkrpy
token = "bot token here"
DBKR_token = "DBKR Token here"
class Bot(commands.Bot):
def __init__(self):
super().__init__(command_prefix="Prefix here")
if __name__ == '__main__':
bot = Bot()
dbkrpy.UpdateGuild(bot,DBKR_token)
bot.run(token)#Auto Loop
import discord
from discord.ext import commands
token = "bot token here"
DBKR_token = "DBKR Token here"
bot = commands.Bot(command_prefix="Prefix here")
dbkrpy.UpdateGuild(bot,DBKR_token)
bot.run(token)#Auto Loop
import dbkrpy
import discord
token = "bot token here"
DBKR = "Korean Bot token"
client = discord.Client()
dbkrpy.UpdateGuild(client,DBKR)
client.run(token)import dbkrpy
import discord
from discord.ext import commands
class DBKRinfo(commands.Cog):
def __init__(self, bot):
self.bot = bot
async def getinfo(self, ctx):
info = await dbkrpy.GetById.get_response(538659580855451648)
dbkr = dbkrpy.DBKRGetById(info)
await ctx.send(dbkr.id)
def setup(bot):
bot.add_cog(DBKRinfo(bot))import dbkrpy
import discord
from discord.ext import commands
class BotPage(commands.Cog):
def __init__(self, bot):
self.bot = bot
async def getpage():
page = await dbkrpy.Page.get_response(1)
pagelist = Page(page)
await ctx.send(f"{''.join(pagelist.idlist)}")
def setup(bot):
bot.add_cog(BotPage(bot))import dbkrpy
import discord
from discord.ext import commands
class ChkVote(commands.Cog):
def __init__(self, bot):
self.bot = bot
async def getvote(self, ctx):
token = "DBKR API token"
userid = "user id"
info = await dbkrpy.CheckVote.get_response(token,userid)
dbkr = dbkrpy.CheckVote(info)
await ctx.send(dbkr)
def setup(bot):
bot.add_cog(Chkvote(bot))봇 페이지 확인가능
약간의 최적화
클래스명 변경
로깅출력 여부 설정가능
투표 여부 확인가능
| Back | FazBrowse Home | New Git URL |