티스토리 뷰

개발

디스코드 봇 업데이트

KWG07(joseph0528) 2021. 2. 8. 19:55
반응형

바뀐 내용은 일단

프로필이 이름, 랭킹, 링크만 있어서 허전했는데 solved.ac 사이트 프로필 사진과 티어를 넣어줬고 만약 프로필 사진이 없는 경우

따로 물음표 사진을 출력하게 해 줬고

가장 크게 바뀐 거는 기존 urlopen에서 json을 사용해서 파싱 하는 방법으로 바뀌어서 속도가 좀 더 빨라진 게 크게 바뀐 거고 문제 입력했을 때 문제 티어 출력하는 거만 추가했다.

없어진 거는 틀린 문제 맞은 문제 제출했지만 다 맞지 못 한문제 이렇게 나눠져 있던 거를 푼 문제 안 푼 문제로 2개로 줄였다

그리고 solved.ac에 레이팅 기능이 생겼는데 계산 방법이 제대로 정해지진 않아서 나중에 정해질 경우 추가 예정

그리고 urlopen 대부분을 json으로 바꿀 예정

(팩트는 아무도 안 쓴다는 거)

잡봇이기 때문에 추가할 거 추천받습니다~ 추가하고 싶으신 거는 댓글에 남겨주세요~(있을지는 모르겠지만)

import discord
import requests
import urllib.request as req
from bs4 import BeautifulSoup
import emoji
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import openpyxl
import bi
import json
from tkinter import *
from tkinter import messagebox
from urllib.error import URLError,HTTPError
import asyncio
client=discord.Client()
def boj(ex):
    if len(ex)==1:return ["https://www.acmicpc.net/",-9]
    else:
        if ex[1]=="profile"or ex[1]=="프로필":
            if len(ex)==3:
                q="https://www.acmicpc.net/user/"+ex[2]
                return [q,1]
        elif ex[1]=="rank"or ex[1]=="랭크"or ex[1]=="순위":
            return [0,2]
            #if len(ex)==2:
            #    return ["https://www.acmicpc.net/ranklist",2]
            #else:
            #    page="https://www.acmicpc.net/ranklist/"+ex[2]
            #    return [page,2]
        elif ex[1]=="search"or ex[1]=="검색":
            page="https://www.acmicpc.net/problemset?search="
            searchname=""
            for i in range(2,len(ex)):
                searchname+=ex[i]+"+"
            page+=searchname
            #print(page)
            return [page,4]
        else:
            q="https://www.acmicpc.net/problem/"+ex[1]
            return [q,3]

def link(x,soup):
    return soup.select_one(x).string

def solved(ex):
    if len(ex)==1:return "https://solved.ac"
    else:
        if ex[1]=="profile"or ex[1]=="프로필":
            if len(ex)==3:
                q="https://solved.ac/profile/"+ex[2]
                return q
        else:
            if(len(ex)==3 or len(ex)==4)and (ex[1]=="rank"or ex[1]=="랭크"or ex[1]=="순위"):
                if ex[2]=="ti"or ex[2]=="티어":
                    if len(ex)==3:page="https://solved.ac/ranking/tier"
                    else:page="https://solved.ac/ranking/tier?page="+ex[3]
                if ex[2]=="cl"or ex[2]=="클래스":
                    if len(ex)==3:page="https://solved.ac/ranking/class"
                    else:page="https://solved.ac/ranking/class?page="+ex[3]
                if ex[2]=="co"or ex[2]=="기여도":
                    if len(ex)==3:page="https://solved.ac/ranking/contribution"
                    else:page="https://solved.ac/ranking/contribution?page="+ex[3]
                return page
            
def deln(ip):
    for i in range(len(ip)):
        if ip[i]=="건"or ip[i]=="충"or ip[i]=="gun"or ip[i]=="고"or ip[i]=="원"or ip[i]=="규"or ip[i]=="추ᇰ"or ip[i]=="ㄱㅓㄴ"or ip[i]=="거ᇈ":return False
    return True
def gymanst(ip):
    if ip.find("바보")>=0:return True
    if ip.find("못하")>=0:return True
    if ip.find("기만")>=0 and ip.find("아닌")>=0:return True
    return False
qh=0
def chan(qh):
    global soup
    #print("qh",qh)
    tp=qh
    tp=max(tp,1)
    pagenumber=(tp-1)//10+1
    url="https://www.acmicpc.net/ranklist/"+str(pagenumber)
    try:             
        res=req.urlopen(url).read()
        soup=BeautifulSoup(res,'html.parser')
        qr=""
        co=(tp*10-9)%100
        for i in range(co,co+10):
            qr+=str(link("#ranklist > tbody > tr:nth-child("+str(i)+") > td:nth-child(1)",soup))+". "
            name12=str(soup.select_one("#ranklist > tbody > tr:nth-child("+str(i)+") > td:nth-child(2) > a"))
            qty=15
            name1=""
            while 1:
                if name12[qty]!="\"":name1+=name12[qty]
                else:break
                qty+=1
            qr+=name1+" ("
            qr+=str(link("#ranklist > tbody > tr:nth-child("+str(i)+") > td:nth-child(4) > a",soup))+"문제)\n"
        return [qr,0]
        #msg=await message.channel.send(message.channel,embed=discord.Embed(title="",description=qr,color=0x62c1cc))
        #await msg.add_reaction("\U00002B05")
        #await msg.add_reaction("\U000027A1")
    except HTTPError as e:
        return ["잘못 입력하셨습니다.",1]
        #await message.channel.send("잘못 입력하셨습니다.")
def ac(usern,pb):
    req=requests.get('https://solved.ac/search?query='+str(pb)+'%20solved_by:'+usern)#https://solved.ac/profile/joseph0528
    soup=BeautifulSoup(req.text,'html.parser')
    jsonData = json.loads(soup.find('script', {'type':'application/json'}).string)['props']['pageProps']
    if len(jsonData["result"]["problems"])==0:return 0
    else:return 1

@client.event
async def on_ready():
    print("Start {0.user}".format(client))
system=0
tier=["언레","브론즈 5","브론즈 4","브론즈 3","브론즈 2","브론즈 1",\
    "실버 5","실버 4","실버 3","실버 2","실버 1",\
    "골드 5","골드 4","골드 3","골드 2","골드 1",\
    "플래티넘 5","플래티넘 4","플래티넘 3","플래티넘 2","플래티넘 1",\
    "다이아 5","다이아 4","다이아 3","다이아 2","다이아 1",\
    "루비 5","루비 4","루비 3","루비 2","루비 1"]
msg1=""
@client.event
async def on_message(message):
    global system,qh,msg1,tier
    #await message.channel.send("누군가 때문에 완전히 페쇠함(뚫는 방법은 있으니 뚫어보셈)")
    if message.author==client.user:return

    if message.content.startswith("1124579410016957024519240651218144"):
        await message.channel.send("귀여운 곤충 >_<")
        
    if message.content.startswith("~add"):
        try:
            ex=message.content[5:].split()
            url="https://www.acmicpc.net/user/"+ex[0]
            res=req.urlopen(url)
            res=res.read()
            soup=BeautifulSoup(res,'html.parser')
            userip=str(message.author).split("#")
            nm=bi.add(ex[0],"#"+userip[1])
            if nm==0:
                await message.channel.send("한사람당 한 계정만 추가 가능합니다.")
            else:
                await message.channel.send("추가 완료되었습니다.")
        except HTTPError as e:
                await message.channel.send("아이디가 잘못되었습니다.")
                
    if str(message.author).split("#")[1]=="9311":
        await message.channel.send("정후님 잼민이~")
    
    
    if message.content.startswith("~gyman +"):
        userip=str(message.author).split("#")
        if not deln(userip[0]):
            ex=message.content[8:].split()
            val=int(ex[0])
            username=ex[len(ex)-1]
            excel=openpyxl.load_workbook("gymanstack.xlsx")
            workseet=excel.active
            g=1
            score=[]
            while 1:
                if workseet.cell(row=g,column=1).value==None:
                    break
                if str(workseet.cell(row=g,column=1).value)[:10]==str(message.guild.id)[:10]:
                    i=2
                    while 1:
                        if workseet.cell(row=g,column=i).value==None:
                            workseet.cell(row=g,column=i).value=username
                            workseet.cell(row=g,column=i+1).value=val
                            break
                        if workseet.cell(row=g,column=i).value==username:
                            workseet.cell(row=g,column=i+1).value+=val
                            break
                        i+=2
                    break
                g+=1
            excel.save("gymanstack.xlsx")
            excel.close()
            await message.channel.send("추가했습니다")
        else:await message.channel.send("당신은 관리자가 아닙니다.")

    if message.content.startswith("~gyman -"):
        userip=str(message.author).split("#")
        if not deln(userip[0]):
            ex=message.content[8:].split()
            val=int(ex[0])
            username=ex[len(ex)-1]
            excel=openpyxl.load_workbook("gymanstack.xlsx")
            workseet=excel.active
            g=1
            score=[]
            while 1:
                if workseet.cell(row=g,column=1).value==None:
                    break
                if str(workseet.cell(row=g,column=1).value)[:10]==str(message.guild.id)[:10]:
                    i=2
                    while 1:
                        if workseet.cell(row=g,column=i).value==None:break
                        if workseet.cell(row=g,column=i).value==username:
                            workseet.cell(row=g,column=i+1).value-=val
                            workseet.cell(row=g,column=i+1).value=max(0,workseet.cell(row=g,column=i+1).value)
                            break
                        i+=2
                    break
                g+=1
            excel.save("gymanstack.xlsx")
            excel.close()
            await message.channel.send("추가했습니다")
        else:await message.channel.send("당신은 관리자가 아닙니다.")
    
    if message.content.startswith("~gyman ranking"):
        #q="``\nhello\n``";await message.channel.send(q)
        excel=openpyxl.load_workbook("gymanstack.xlsx")
        workseet=excel.active
        g=1
        score=[]
        while 1:
            if workseet.cell(row=g,column=1).value==None:
                break
            if str(workseet.cell(row=g,column=1).value)[:10]==str(message.guild.id)[:10]:
                i=2
                while 1:
                    if workseet.cell(row=g,column=i).value==None:
                        break
                    score.append([workseet.cell(row=g,column=i+1).value,workseet.cell(row=g,column=i).value])
                    i+=2
                break
            g+=1
        score.sort()
        q="``\n"
        if len(score)==0:
            q+="아무도 없습니다.\n"
        else:
            rank=0
            for i in range(len(score)-1,-1,-1):
                rank+=1
                q+=str(rank)+". ID : "+str(score[i][1])+" ("+str(score[i][0])+"회)\n"
        q+="``\n"
        await message.channel.send(q)
        excel.close()

    if gymanst(message.content):
        userip=str(message.author).split("#")
        username="#"+userip[1]
        excel=openpyxl.load_workbook("gymanstack.xlsx")
        workseet=excel.active
        g=1
        wi=[0,0]
        while 1:
            if workseet.cell(row=g,column=1).value==None:
                workseet.cell(row=g,column=1).value=str(message.guild.id)[:10]
                workseet.cell(row=g,column=2).value=username
                workseet.cell(row=g,column=3).value=1
                wi=[g,3]
                break
            #print(workseet.cell(row=g,column=1).value,message.guild.id)
            if str(workseet.cell(row=g,column=1).value)[:10]==str(message.guild.id)[:10]:
                i=2
                while 1:
                    if workseet.cell(row=g,column=i).value==None:
                        workseet1.cell(row=g,column=i).value=username
                        workseet1.cell(row=g,column=i+1).value=1
                        wi=[g,i+1]
                        break
                    if workseet.cell(row=g,column=i).value==username:
                        workseet.cell(row=g,column=i+1).value+=1
                        wi=[g,i+1]
                        break
                    i+=2
                break
            g+=1
        excel.save("gymanstack.xlsx")
        counted=str(userip[0])+"님의 지금까지 기만한 횟수는 "+str(workseet.cell(row=wi[0],column=wi[1]).value)+"번입니다"
        await message.channel.send(counted)
        excel.close()
        
    if message.content.startswith("~good"):q="good";await message.channel.send("\U0001F44D")

    if message.content.startswith("서버 이름"):await message.channel.send(message.guild.id)
    
    if message.content.startswith("갓"):
        e=emoji.emojize(":arrow_up:")
        await message.channel.send(e)
    
    if message.content.startswith("마자효"):q="마자효\n1104";await message.channel.send(q)

    if message.content.startswith("~gymanstack me"):
        userip=str(message.author).split("#")
        username="#"+userip[1]
        excel=openpyxl.load_workbook("gymanstack.xlsx")
        workseet=excel.active
        g=1
        wi=[0,0]
        while 1:
            if workseet.cell(row=g,column=1).value==None:wi=[False,0];break
            #print(workseet.cell(row=g,column=1).value,message.guild.id)
            if str(workseet.cell(row=g,column=1).value)[:10]==str(message.guild.id)[:10]:
                i=2
                while 1:
                    if workseet.cell(row=g,column=i).value==None:
                        wi=[False,0]
                        break
                    if workseet.cell(row=g,column=i).value==username:
                        wi=[g,i+1]
                        break
                    i+=2
                break
            g+=1
        excel.save("gymanstack.xlsx")
        if not wi[0]:
            await message.channel.send("아직까지 이서버에서 기만한 적이 없습니다")
        else:
            counted=str(userip[0])+"님의 지금까지 기만한 횟수는 "+str(workseet.cell(row=wi[0],column=wi[1]).value)+"번입니다"
            await message.channel.send(counted)
        excel.close()
    
    if message.content.startswith("~system"):
        userip=str(message.author).split("#")
        if not deln(userip[0]):
            msg=message.content[8:].split()
            if len(msg)==1:
                if msg[0]=="on":system=1
                elif msg[0]=="off":system=0
                else:await message.channel.send("please say on or off")
                if msg[0]=="on"or msg[0]=="off":await message.channel.send("on" if system==1 else "off")
        else:
            await message.channel.send("당신은 관리자가 아닙니다")

    if message.content.startswith("~fan"):
        msg=message.content[5:];msg+="님 팬이에요";await message.channel.send(msg)

    if message.content.startswith("~cute"):
        #await message.channel.send("누군가 때문에 지움 ㅅㄱ")
        msg=str(message.content[6:])
        if system==0:
            if deln(msg):msg+="님 귀여워요~";await message.channel.send(msg)
            else:await message.channel.send("그 이름은 금지 되어있습니다")
        else:
            msg+="님 귀여워요~";await message.channel.send(msg)

    if message.content.startswith("~help"):
        ms=""
        ms+="팬이에요 : ~fan nickname\n\n"
        ms+="귀여워요:~cute nickname\n\ngood:~good\n\ngyman:~gyman nickname(정지)\n\ngod:~god nickname\n\n"
        ms+="지원하는 사이트:baekjoon(boj)(백준)\n\n"
        ms+="ps site:~ps sitename\n\npssite number:~ps sitename number\n\n"
        ms+="ps site profile:~ps sitename profile name\n\n"
        ms+="ps site rank:~ps sitename rank pagenumber\n\n"
        ms+="solved.ac rank tier:~ps solved.ac rank (ti or 티어) pagenumber\n\n"
        ms+="solved.ac rank class:~ps solved.ac rank (cl or 클래스) pagenumber\n\n"
        ms+="solved.ac rank contribution(기여도):~ps solved.ac rank (co or 기여도) pagenumber\n\n"
        ms+="ps codeforces rank korea:~ps codeforces rank korea pagenumber\n\n"
        ms+="ps sitename search:~ps sitename search sitenamename(검색할 단어)\n\n"
        ms+="기만 랭킹:~gyman ranking\n\n"
        ms+="자신의 기만 횟수:~gymanstack me\n\n"
        ms+="백준 해당 문제 제출기록:~ps boj stat 문제번호\n\n"
        msg=await message.channel.send(message.channel,embed=discord.Embed(title="test bot help",description=ms,color=0x62c1cc))
        await msg.edit(content="")
        
    #if message.content.startswith("~gyman"):
    #    #await message.channel.send("별게 다 뚫리네ㅡㅡ")
    #    msg=str(message.content[7:])
    #    if system==0 and not deln(msg):
    #        await message.channel.send("기만이 아닙니다")
    #    else:
    #        msg+="님 기만";await message.channel.send(msg)
        
    if message.content.startswith("~god"):
        msg=str(message.content[5:])
        if system==0:
            if deln(msg):msg+="님 갓";await message.channel.send(msg)
            else:await message.channel.send("갓이 아닙니다")
        else:
            msg+="님 갓";await message.channel.send(msg)
        
    if message.content.startswith("~ps"):
        ex=message.content[4:].split()
        if len(ex)!=0:
            if ex[0]=="boj"or ex[0]=="baekjoon"or ex[0]=="백준":
                File=open("boj.txt","r")
                line=File.readlines()
                qa=line[0][:len(line[0])-1].split(",")
                userip=str(message.author).split("#")
                if "#"+userip[1] in qa:
                    index=qa.index("#"+userip[1])
                    usern=line[index+1][:len(line[index+1])-1]
                    #print(usern)
                    qy=boj(ex)
                    if qy[1]==3:
                        try:
                            url1="https://www.acmicpc.net/problem/"+ex[1]
                            res1=req.urlopen(url1)
                            #res1=res1.read()
                            #soup=BeautifulSoup(res1,'html.parser')
                            res=requests.get(qy[0])
                            url=qy[0]
                            soup=BeautifulSoup(res.content,'html.parser')
                            psname=list(str(soup.html.head.title))
                            nm=str("".join(psname[psname.index(">")+1:psname.index("/")-1]))
                            nm+="\n"
                            nm+=url+"\n\n"
                            #print('https://solved.ac/search?query='+ex[1])
                            req1=requests.get('https://solved.ac/search?query='+ex[1])
                            soup1=BeautifulSoup(req1.text,'html.parser')
                            jsonData=json.loads(soup1.find('script', {'type':'application/json'}).string)['props']['pageProps']
                            solved=ac(usern,int(ex[1]))


                            #req1=requests.get('https://www.acmicpc.net/user/'+usern)
                            #soup1=BeautifulSoup(req1.text,'html.parser')
                            #jsonData=json.loads(soup1.find('script', {'type':'application/json'}).string)['props']['pageProps']

                            
                            if solved==1:nm="```diff\n+맞은문제+\n```\n"+nm
                            else:nm="```\n안푼 문제\n```\n"+nm
                            nm+="난이도 : "+str(tier[jsonData["result"]["problems"][0]["level"]])+"\n\n"
                            url="https://www.acmicpc.net/problem/status/"+ex[1]
                            res=req.urlopen(url)
                            res=res.read()
                            soup=BeautifulSoup(res,'html.parser')
                            pr=0
                            pt=[]
                            pq=""
                            for i in range(1,15):
                                statvalue=0
                                statname=str(link("#statics > tbody > tr:nth-child("+str(i)+") > th",soup))
                                if statname!="평균 시도"and statname!="정답 비율"and statname!="제출한 사람"and statname!="맞은 사람":statvalue=str(link("#statics > tbody > tr:nth-child("+str(i)+") > td > a",soup))
                                if statname=="제출":pt.append(["제출 횟수:"+statvalue+"번\n\n",statvalue])
                                if statname=="맞았습니다":pt.append(["맞았습니다:"+statvalue+"번",statvalue]);pr+=int(statvalue)
                                if statname=="틀렸습니다":pt.append(["틀렸습니다:"+statvalue+"번",statvalue]);pr+=int(statvalue)
                                if statname=="시간 초과":pt.append(["시간 초과:"+statvalue+"번",statvalue]);pr+=int(statvalue)
                                if statname=="메모리 초과":pt.append(["메모리 초과:"+statvalue+"번",statvalue]);pr+=int(statvalue)
                                if statname=="출력 초과":pt.append(["출력 초과:"+statvalue+"번",statvalue]);pr+=int(statvalue)
                                if statname=="런타임 에러":pt.append(["런타임 에러:"+statvalue+"번",statvalue]);pr+=int(statvalue)
                                if statname=="컴파일 에러":pt.append(["컴파일 에러:"+statvalue+"번",statvalue]);pr+=int(statvalue)
                                if statname=="컴파일 에러":break

                            pr/=100
                                
                            for i in range(len(pt)):
                                if i!=0:pq+=pt[i][0]+"\n"+format(int(pt[i][1])/pr,".2f")+"%\n\n"
                                else:pq+=pt[i][0]
                            msg=await message.channel.send(message.channel,embed=discord.Embed(title="statistics",description=nm+pq,color=0x62c1cc))
                            await msg.edit(content="")
                        except HTTPError as e:
                            await message.channel.send("문제 번호가 잘못되었습니다")
                        
                    elif qy[1]==1:
                        try:
                            qr=""
                            url=qy[0]
                            res=req.urlopen(url)
                            res=res.read()
                            soup=BeautifulSoup(res,'html.parser')
                            psname=str(soup.html.head.title)
                            #print(psname)
                            qr+="**"+ex[2]+"**\n\n"
                            qr+="랭킹:"+str(link("#statics > tbody > tr:nth-child(1) > td",soup))+"위\n\n"
                            #print('https://solved.ac/profile/'+ex[2])
                            req1=requests.get('https://solved.ac/profile/'+ex[2])#https://solved.ac/profile/joseph0528
                            soup1=BeautifulSoup(req1.text, 'html.parser')
                            jsonData = json.loads(soup1.find('script', {'type':'application/json'}).string)['props']['pageProps']
                            qr+="티어 : "+tier[jsonData["user"]["result"]["user"][0]["level"]]+"\n\n"
                            qr+=qy[0]
                            Embed=discord.Embed(title="",description=qr,color=0x62c1cc)
                            profileimage=jsonData["user"]["result"]["user"][0]["profile_image_url"]
                            if profileimage==None:
                                Embed.set_thumbnail(url="https://media.discordapp.net/attachments/788579938239250462/807931237725241394/unknown.png")
                            else:
                                Embed.set_thumbnail(url=profileimage)

                            msg=await message.channel.send("",embed=Embed)
                        except HTTPError as e:
                            await message.channel.send("유저 이름이 잘못되었습니다")
                    elif qy[1]==2:
                        qh=0
                        if len(ex)>=3:
                            qh=int(ex[2])
                            uy=chan(qh)
                            if uy[1]:
                                qh=1
                                await message.channel.send(uy[0])
                            else:
                                msg1=await message.channel.send(message.channel,embed=discord.Embed(title="",description=uy[0],color=0x62c1cc))
                                await msg1.edit(content="")
                                await msg1.add_reaction("\U00002B05")
                                await msg1.add_reaction("\U000027A1")
                        else:
                            qh=1
                            uy=chan(qh)
                            if uy[1]:
                                await message.channel.send(uy[0])
                            else:
                                msg1=await message.channel.send(message.channel,embed=discord.Embed(title="",description=uy[0],color=0x62c1cc))
                                await msg1.edit(content="")
                                await msg1.add_reaction("\U00002B05")
                                await msg1.add_reaction("\U000027A1")
                    else:
                        await message.channel.send(qy[0])
                else:
                    yu="이 기능을 사용하려면 아이디 추가를 해줘야합니다 아이디 추가하는 방법은 ~add 백준 닉네임 이렇게 치시면 됩니다."
                    await message.channel.send(yu)
                File.close()

@client.event
async def on_reaction_add(reaction,user):
    global qh,system,msg1
    if user.bot==1:
        return None
    if str(reaction.emoji)=="\U000027A1":
        qh+=1
        uy=chan(qh)
        if uy[1]:
            qh-=1
            await reaction.message.channel.send(uy[0])
        else:
            await msg1.delete()
            msg1=await reaction.message.channel.send(reaction.message.channel,embed=discord.Embed(title="",description=uy[0],color=0x62c1cc))
            await msg1.edit(content="")
            await msg1.add_reaction("\U00002B05")
            await msg1.add_reaction("\U000027A1")
    if str(reaction.emoji)=="\U00002B05":
        qh-=1
        qh=max(1,qh)
        uy=chan(qh)
        if uy[1]:
            qh+=1
            await reaction.message.channel.send(uy[0])
        else:
            await msg1.delete()
            msg1=await reaction.message.channel.send(reaction.message.channel,embed=discord.Embed(title="",description=uy[0],color=0x62c1cc))
            await msg1.edit(content="")
            await msg1.add_reaction("\U00002B05")
            await msg1.add_reaction("\U000027A1")
                

 

메인 코드

import requests
import urllib.request as req
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
def add(name,ip):
    File=open("boj.txt","r")
    line=File.readlines()
    qa=line[0][:len(line[0])-1].split(",")
    if not ip in qa:
        uo=line[0][:len(line[0])-1]+","+ip+"\n"
        File1=open("boj.txt","w")
        for i in range(1,len(line)):uo+=line[i]
        uo+=name
        print(uo,file=File1)
        File.close()
        File1.close()
        return 1
    else:
        return 0

 

bi 코드

반응형

'개발' 카테고리의 다른 글

디스코드 봇 업데이트  (0) 2021.05.15
2048게임 제작  (5) 2021.02.28
디스코드 봇 개발  (1) 2021.01.25
tile게임 만들기  (0) 2021.01.15
오목 게임 만들기  (0) 2021.01.13
댓글