我无法让TBS合并我作为函数参数引用的字段之一。 eventid被合并,但eventdate不合并。有什么想法吗?
snekfetch.get(`http://ip-api.com/json/${args}`).then(r => {
let Geo = new Discord.RichEmbed()
.setTimestamp()
.setThumbnail(`https://image.ibb.co/kcFJ09/resolver.png`)
.setTitle(`**Deluxo Puller - GeoIP Lookup**`)
.setDescription(`**__GeoIP Lookup Information__**
**Looked Up IP**: ${args}
**ASN**: ${r.body.as}
**City**: ${r.body.city}`)
.setFooter(`Resolved By: ${message.author.tag}`);
message.channel.send({ embed: Geo });
});
出现了eventdate字段,因为我可以将TBS标记移动到页面上的其他位置,并返回数据。我尝试使用ondata,但从未调用过该函数,因此我开始使用onformat。
[blk.mp3filename; onformat=f_constructPath; year=[blk.eventdate; frm='YYYY'; noerr]; eventid=[blk.eventid; noerr]; strconv=no; noerr]
以下是ondata语句版本的大部分代码:
[blk.mp3filename; ondata=f_constructPath; strconv=no; noerr]
答案 0 :(得分:0)
如果您为blk
定义了一个块边界(也就是说,您至少有一个带有参数block
的TBS字段),那么这是正常的块合并,而参数ondata
是已处理(类似于此TBS字段中的所有块参数)。
如果您期望ondata
函数不起作用,则可以通过观察参数$CurrRec
的功能来对其进行调试。例如:var_export($CurrRec)
。
请注意,只有与block
参数一起使用时,才处理块参数。
如果您没有为blk
定义任何块边界(也就是说,您没有参数为block
的TBS字段),则TBS仅合并第一条记录,其行为类似于MerfeField()
。即,不处理任何块参数。因此ondata
函数将被忽略。
在这种情况下,您可以使用onformat
,并且可以通过观察参数$CurrPrm
的功能来调试相应的函数。在您的情况下,根据您的摘要,我猜想嵌入在参数中的TBS字段根本不会合并。
再说一遍:在您的模板中,块内有一些TBS字段,块外有一些其他TBS字段。外部字段将与普通块部分分开合并。