【问题标题】:Why is my UpTimeRobot monitor not working? It says that there was a connection timeout为什么我的 UpTimeRobot 监视器不工作?它说有一个连接超时
【发布时间】:2021-09-15 00:31:23
【问题描述】:

今天,我的 discord bot 的监视器停止工作,它基于 uptimerobot 的免费自动 ping 功能,使我的 discord bot 每 5 分钟刷新一次,从而保持运行。今天,这一切都停止了工作,我的显示器已经关闭了一整天,我的不和谐机器人也是如此,我已经尝试了从重置显示器到创建一个全新帐户来尝试修复它的所有方法,但没有任何效果.我的代码有问题吗?顺便说一句,每次我尝试新的东西来修复它时,它只是说我的显示器已关闭,并且连接超时,无论如何这是我的代码:

from flask import Flask
from threading import Thread

app = Flask('')

@app.route('/')
def home():
    return "Greetings. I am currently alive!"

def run():
  app.run(host='0.0.0.0',port=8080)

def keep_alive():
    t = Thread(target=run)
    t.start()

also yes I have all the correct imports

【问题讨论】:

  • 这里可能有很多东西。首先,在令牌之前的主文件中代码末尾是否有keep_alive() 函数?编辑:Uptime Robot 停机了大约 2 小时
  • 我最后有保活功能,但让我检查一下uptimerobot
  • @ChaoticNebula 还在停机
  • 重启你的显示器
  • @ChaoticNebula 我试过了

标签: python discord discord.py bots monitoring


【解决方案1】:

-确保网站可以被外部流量看到 - 如果您想要一种简单的方式来托管它,请使用 replit 之类的东西 - 确保将其放在 client.run("token") 上方

-来自愤怒机器人的首席开发人员

【讨论】:

    猜你喜欢
    • 2022-10-20
    • 2018-05-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    相关资源
    最近更新 更多