程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Discord 使用命令无法正常工作大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决Discord 使用命令无法正常工作?

开发过程中遇到Discord 使用命令无法正常工作的问题如何解决?下面主要结合日常开发的经验,给出你关于Discord 使用命令无法正常工作的解决方法建议,希望对你解决Discord 使用命令无法正常工作有所启发或帮助;
@clIEnt.command()
async def ause(ctx,*,item=NonE):
    res = await sell_this(ctx.author,item,1)
    
    responses = ["You looked at the watch and you realise it's 9:00PM and you have a date with a girl say COMING WAIT ME! in 15 seconds before she kills you","You looked at the watch and you remmeber you have a meeTing tomorrow and it's 2:00AM and then you realise it's a dream say  'WAKE UP WAKE UP' before you miss th@R_673_9473@ervIEw","You looked at the watch and you realised it wasted 1 minute of your time say 'I lovE TIME' in 15 seconds before FBI comes raID your home",]
    
    #VARiABLES
    users = await geT_Bank_data()
    user = ctx.author
    earnings = random.randrange(0,6200)
    bad = random.randrange(0,4200)


    if not res[0]:
        print("OUT!")
    

    def check(messagE):
            return message.author == ctx.author
    
    try:
            await ctx.send(random.choice(responses))
            response = await clIEnt.wait_for('message',check=check,timeout=6)
            if responses[0]:
                if response.content == "COMING WAIT ME!":
                    await ctx.send(f'**{random.choice(responses)}**')
                    users[str(user.ID)]["wallet"] += earnings
                else:
                    await ctx.send(f"**divORCED ?**! Your wife took {BaD} coins from you. and she took your lovely kID ?**")
                    users[str(user.ID)]["wallet"] -= bad
    except:
                    await ctx.send(f"**divORCED ?**! Your wife took {BaD} coins from you. and she took your lovely kID ?")
                    users[str(user.ID)]["wallet"] -= bad

                    with open("bank.Json","w") as f:
                        Json.dump(users,f,indent=4)
                    if responses[1]:
                        if response.content == "WAKE UP WAKE UP":
                            await ctx.send(f'**{random.choice(responses)}**')
                            users[str(user.ID)]["wallet"] += earnings
                        else:
                            await ctx.send(f"**MISSED MEETin ?**! I  took {BaD} coins from you. and your momma dis-owned you ?**")
                            users[str(user.ID)]["wallet"] -= bad
                            with open("bank.Json","w") as f:
                                Json.dump(users,indent=4)            
                    if responses[2]:
                        if response.content == "I lovE TIME":
                            users[str(user.ID)]["wallet"] += earnings
                        else:
                            await ctx.send(f"**FBI RAIDED YOUR HOME ⚠**! FBI JAILED YOU FOR 45 years and  took {BaD} coins from you. ?**")
                            users[str(user.ID)]["wallet"] -= bad
                            with open("bank.Json",indent=4)                   

此代码基本上用于使用一个项目,我希望它选择一个随机响应/问题,例如,如果第一个被选中并且玩家输入“IM COMING WAIT!”我想要它给他/她的钱,但不知道为什么它不起作用。

所以首先 它不是选择随机问题 它不工作 什么都没有正常运行

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的Discord 使用命令无法正常工作全部内容,希望文章能够帮你解决Discord 使用命令无法正常工作所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。