Skip to content

Commit 1e018a8

Browse files
committed
support buttons
1 parent 8474bae commit 1e018a8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ class RPCClient extends EventEmitter {
534534
assets,
535535
party,
536536
secrets,
537+
buttons: args.buttons,
537538
instance: !!args.instance,
538539
},
539540
});

test/rp.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ const client = new Client({
1313
});
1414

1515
client.on('ready', async () => {
16-
await client.selectTextChannel('201803114049699849');
17-
console.log(await client.getChannel('201803114049699849'));
18-
client.destroy()
19-
.then(() => {
20-
console.log('closed!');
21-
});
16+
await client.setActivity({
17+
buttons: [
18+
{ label: 'B1', url: 'https://snek.dev/b1' },
19+
{ label: 'B2', url: 'https://snek.dev/b2' },
20+
],
21+
});
2222
});
2323

2424
client.login(require('./auth')).catch(console.error);

0 commit comments

Comments
 (0)