小编Flu*_*ipt的帖子

机器人两次执行相同的命令

我正在使用重写制作一个不和谐的机器人,但是当我的命令运行时,它会发送两次消息 100% 没有其他调用来发送该消息,而且它只是第一条消息(等等,我正在收集数据),即发送两次。这是命令的代码:

    @bot.command()
    async def testcmd(ctx):
      print("called")
      msgtemp = await ctx.message.channel.send("Hold on, I'm gathering the data")
      print("sent")
      time.sleep(3)
      await msgtemp.delete()
      with open("fileofthings.txt") as fl:
        await ctx.send(fl.read())
Run Code Online (Sandbox Code Playgroud)

python-3.x discord discord.py

3
推荐指数
1
解决办法
4264
查看次数

Spyder 版本 4.2.3 在 Mac、OS Big Sur 上落后

当我在 Spyder (Mac OS Big Sur) 中输入时,我遇到了一些明显的延迟。

我看到堆栈溢出帖子表明这个问题在最新版本的 Spyder 中已得到解决。然而,当我将 Spyder 更新到 4.2.3 时,我的滞后问题仍然存在。

所有输入都需要 1-3 秒来注册并显示在控制台和我正在编写的任何脚本中。我多次尝试重启,spyder也自行关闭。我确信这有某种关系。

我也尝试按照此链接中的步骤操作,但它们不起作用:https ://docs.spyder-ide.org/current/faq.html#troubleshooting-macos-bigsur

python spyder macos-big-sur

3
推荐指数
1
解决办法
2626
查看次数

标签 统计

discord ×1

discord.py ×1

macos-big-sur ×1

python ×1

python-3.x ×1

spyder ×1