我想像普通音乐机器人一样制作嵌入消息,就像这个带有链接的嵌入消息可以点击我希望我的内容是描述将显示,突出显示的是附加到它的链接,就像图片一样。这是我的嵌入这是我的代码if (command === 'test') { var search = message.content.split(/\s+/g).slice(1).join(" "); if (!search.length) { return message.channel.send("PLs enter a name!"); } else { const puppeteer = require("puppeteer"); const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto(`https://i hide website cause privacy?keyword=${search}`); let Anime = await page.evaluate(() => { let items = document.querySelectorAll('ul[class= "last-film-box"] > li > a'); let links = []; items.forEach(item => { links.push({ titl: item.title, url: item.href }); }); return links; }); let i = 0; let content = Anime.map(e => { i++; return i + "/ " + `${e.titl.slice(0, 50)} ${e.url}`; }) let ContentEmbed = new Discord.MessageEmbed(); ContentEmbed.setTitle("Here the result"); ContentEmbed.setDescription(content); message.channel.send(ContentEmbed); }}
添加回答
举报
0/150
提交
取消