小编taz*_*zan的帖子

如何将值合并到 discord.py 中的一条消息中

我希望我的机器人能够说出一条消息,提及一个用户,然后用一条随机消息响应,所有这些都在同一行中,而不是在 3 个单独的行中。

这是我以前的方法:

if msg.startswith('respond')
    await message.channel.send('alright then,')
    await message.channel.send(message.author.mention)
    await message.channel.send(random.choice(responses))
Run Code Online (Sandbox Code Playgroud)

但是,这使它们都出现在同一行中,但我不知道如何将它们合并为一条单行。这是我多次失败的尝试之一:

if msg.startswith('respond'):
    await message.channel.send ('alright then, <message.author.mention> <random.choice(responses)>')
Run Code Online (Sandbox Code Playgroud)

(请不要取笑我的业余编码技巧lmao)

python merge bots discord discord.py

2
推荐指数
1
解决办法
34
查看次数

标签 统计

bots ×1

discord ×1

discord.py ×1

merge ×1

python ×1