Skip to content

Commit

Permalink
support buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Dec 23, 2020
1 parent 8474bae commit 1e018a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ class RPCClient extends EventEmitter {
assets,
party,
secrets,
buttons: args.buttons,
instance: !!args.instance,
},
});
Expand Down
12 changes: 6 additions & 6 deletions test/rp.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const client = new Client({
});

client.on('ready', async () => {
await client.selectTextChannel('201803114049699849');
console.log(await client.getChannel('201803114049699849'));
client.destroy()
.then(() => {
console.log('closed!');
});
await client.setActivity({
buttons: [
{ label: 'B1', url: 'https://snek.dev/b1' },
{ label: 'B2', url: 'https://snek.dev/b2' },
],
});
});

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

0 comments on commit 1e018a8

Please sign in to comment.