我的机器人不会发送嵌入内容。它说“名称”未定义

时间:2020-10-22 14:44:27

标签: python discord discord.py

在我的不和谐频道中,我执行.serverinfo,即使我拥有以下代码,它也不会响应我:

let lowerBound = nodesSortedByY.firstIndex(where: { $0 <= 4.0 }) ?? nodesSortedByY.startIndex
let upperBound = nodesSortedByY.lastIndex(where: { $0 >= 2.0 }) ?? nodesSortedByY.endIndex
let sub = nodesSortedByY[lowerBound...upperBound]

有人知道为什么吗?

1 个答案:

答案 0 :(得分:1)

@bot.command()

您需要在此处定义名称

@bot.command(name='serverinfo')