music: move channel name to description on youtube search

This commit is contained in:
Cynthia Foxwell 2022-04-24 12:16:25 -06:00
parent c116ed2dc8
commit c48880ff4f

View file

@ -365,11 +365,12 @@ async function youtubeSearch(msg, str) {
const selection = items.map((item) => ({
value: "https://youtu.be/" + item.id.videoId,
key: item.id.videoId,
display:
`"${item.snippet.title}" from ${item.snippet.channelTitle}`.substring(
0,
100
),
display: `${item.snippet.title.substring(0, 99)}${
item.snippet.title.length > 99 ? "…" : ""
}`,
description: `from ${item.snippet.channelTitle.substring(0, 95)}${
item.snippet.channelTitle.length > 95 ? "…" : ""
}`,
}));
try {