做一个不和谐的聊天机器人并遇到此语法错误

时间:2019-03-09 02:12:28

标签: python discord discord.py python-3.7

这是我当前的问题。我通常不问自己一个人解决这个问题,但是我的同伴开发者在周末不在了,所以我无法解决这个问题。

 def acceptBattle(ctx,discord.Member,author.selectedPokemon,discord.Member.selectedPokemon):
        battleacc=input(bot.say(discord.Member +" "+ author +" has challenged you to a battle! Do you accept?"))
        conn = sqlite3.connect('BOT.db')
        c = conn.cursor()
        part=c.execute("SELECT poke FROM Party WHERE id=="+author)
        pokemonteam1=part
        part2=c.execute("SELECT poke FROM Party WHERE id=="+discord.Member)
        pokemon2team=part2
        if(battleacc=='yes'or'y' or 'yeah'):

问题出在第一部分:“ acceptBattle(ctx,discord.Member ...)

具体来说,成员之间的句点(。)

有什么想法吗?感谢任何帮助

def CPokes(ctx,pokemon,message):
        caught=false
        run_away=false
        t=timer(3600,ifcaught)
        while  t>0:
                if run_away==false:
                        run=rand.randint(0,8)
                        if run==0:
                                run_away=true
                                break
                        else:
                                if message.contains('catch'):   
                                        msg=message.split
                                        conn = sqlite3.connect('blazidb.db')
                                        c = conn.cursor()
                                        pokename=c.execute("SELECT Identifier FROM Pokes WHERE numb==pokemon").fetchall()
                                        c.close()
                                        if pokename==msg[2]:
                                                caught=true
                                                randomstatsandNatures(pokemon)
                                                conn = sqlite3.connect('blazidb.db')

                                                break
                                        else:
                                                caught=false
    def Spawn(Pokes):
        spawned=rand.randint(1,807)
        conn = sqlite3.connect('blazidb.db')
        c = conn.cursor()
        spn=c.execute("SELECT `Img AND Identifier FROM poke WHERE numb==spawned").fetchall()

        conn.close()
        bot.say("A Wild Pokemon Appeared!")
        CPokes(ctx,spn[1])
    def ifcaught():
        run_away=true
    def acceptBattle(ctx,discord.Member,author.selectedPokemon,discord.Member.selectedPokemon):
        battleacc=input(bot.say(discord.Member +" "+ author +" has challenged you to a battle! Do you accept?"))
        conn = sqlite3.connect('blazidb.db')
        c = conn.cursor()
        part=c.execute("SELECT poke FROM Party WHERE id=="+author)
        pokemonteam1=part
        part2=c.execute("SELECT poke FROM Party WHERE id=="+discord.Member)
        pokemon2team=part2
        if(battleacc=='yes'or'y' or 'yeah'):
                poke1=author.selectedPokemon
                poke2=discord.Member.selectedPokemon
                BattlePokes(ctx,poke1,poke2,discord.Member,author)
                """BattlePokes(ctx,pokemonteam1,discord.Member,author,pokemonteam2)"""
        else:

0 个答案:

没有答案