我正在用 discord.py 制作一個不和諧的機器人。機器人應(yīng)該加入 VC 并等待 5 分鐘,然后離開。出于測試目的,此數(shù)字已設(shè)置為 2 秒?,F(xiàn)在的問題是,當(dāng)機器人加入時,等待功能被完全忽略。不管我把它設(shè)置成什么。我嘗試了更大的數(shù)字,但這也不起作用。#The part of the code I'm having trouble with:try: vc = await ctx.guild.get_channel(int(chanid)).connect() time.sleep(2) await vc.disconnect()except: print(f"Action Failed: JoinVC.")#Keep in mind, this is only part of the code.我希望機器人嘗試加入頻道,2 秒后離開。當(dāng)代碼按原樣運行時,我沒有收到任何錯誤消息。
添加回答
舉報
0/150
提交
取消