utility.presence: add buttons
This commit is contained in:
parent
9c2fb5f1f6
commit
57d1a3d76a
1 changed files with 11 additions and 0 deletions
|
@ -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");
|
||||
|
||||
if (activity.assets) {
|
||||
|
|
Loading…
Reference in a new issue