utility.presence: add buttons

This commit is contained in:
Cynthia Foxwell 2022-12-01 13:30:14 -07:00
parent 9c2fb5f1f6
commit 57d1a3d76a

View file

@ -788,6 +788,17 @@ presence.callback = async function (msg, line) {
} }
} }
if (activity.buttons && activity.metadata?.button_urls) {
const buttons = [];
for (let i = 0; i < activity.buttons.length; i++) {
buttons.push(
`[${activity.buttons[i]}](${activity.metadata.button_urls[i]})`
);
}
descLines.push(buttons.join(" | "));
}
embed.description = descLines.join("\n"); embed.description = descLines.join("\n");
if (activity.assets) { if (activity.assets) {