0

我想访问此消息嵌入的描述,但它只会让我去到console.log(reaction.message.embeds),然后给我你在下面看到的块

如果我尝试输入:console.log(reaction.message.embeds.MessageEmbed.description)
我的控制台显示:TypeError:无法读取未定义的属性“描述”

我假设这是因为我不正确地调用它,但我不知道任何其他方式来调用该属性......

任何帮助将不胜感激,感谢您阅读...

[ MessageEmbed {
message: 
 Message {
   channel: [TextChannel],
   deleted: false,
   id: '508770239903825922',
   type: 'DEFAULT',
   content: '',
   author: [ClientUser],
   member: [GuildMember],
   pinned: false,
   tts: false,
   nonce: null,
   system: false,
   embeds: [Circular],
   attachments: Collection {},
   createdTimestamp: 1541370677687,
   editedTimestamp: null,
   reactions: [Collection],
   mentions: [MessageMentions],
   webhookID: null,
   hit: null,
   _edits: [Array] },
type: 'rich',
title: 'Canny Valley ',
description: 'User: <@239449569677672448>',
url: undefined,
color: 3447003,
fields: [],
timestamp: undefined,
thumbnail: null,
image: null,
video: null,
author: null,
provider: null,
footer: null } ]
4

1 回答 1

0

我找到了解决方案,只是想在这里发布,以防将来有人和我有同样的问题......

从不和谐服务器读取嵌入消息的内容

这对我帮助很大,虽然花了很多时间搜索!

解决方案是:reaction.message.embeds[0].description给我我需要的确切价值!

于 2018-11-05T01:19:04.207 回答