小编VIK*_*AUR的帖子

如何在discord.py消息之间添加停顿?

我有一个用python编程的discord机器人。我希望机器人说笑话的第一部分,即time.sleep,然后讲笑话的第二部分(都在同一个变量中)。这是我的代码:

if message.content.startswith('!joke'):
    a = 'Can a kangaroo jump higher than a house?' + time.sleep(3) + 'Of course, a house doesn’t jump at all.'
    b = 'Anton, do you think I’m a bad mother?' + time.sleep(3) + 'My name is Paul.'
    c = 'Why can\'t cats work with a computer?' + time.sleep(3) + 'Because they get too distracted chasing the mouse around, haha!'
    d = 'My dog used to chase people on a bike a lot.' + time.sleep(3) + 'It …
Run Code Online (Sandbox Code Playgroud)

python bots python-3.x discord discord.py

-1
推荐指数
1
解决办法
402
查看次数

标签 统计

bots ×1

discord ×1

discord.py ×1

python ×1

python-3.x ×1