mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-20 01:23:33 -04:00
Add join_call.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "revolt.js",
|
||||
"version": "4.0.0-alpha.16",
|
||||
"version": "4.1.0-alpha.0",
|
||||
"main": "dist/index.js",
|
||||
"repository": "https://gitlab.insrt.uk/revolt/revolt.js",
|
||||
"author": "Paul Makles <insrt.uk>",
|
||||
|
||||
@@ -367,6 +367,18 @@ type Routes =
|
||||
route: '/push/unsubscribe',
|
||||
data: undefined,
|
||||
response: undefined
|
||||
} |
|
||||
/**
|
||||
* Voice API
|
||||
*/
|
||||
{
|
||||
// Join voice call for channel.
|
||||
method: 'POST',
|
||||
route: '/channels/:id/join_call',
|
||||
data: undefined,
|
||||
response: {
|
||||
token: string
|
||||
}
|
||||
}
|
||||
|
||||
// ? Below are Typescript typings for extracting route data from the object above.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
export * from './Client';
|
||||
export { Channel, User, Message } from './api/objects';
|
||||
|
||||
export const LIBRARY_VERSION = '4.0.0-alpha.16';
|
||||
export const LIBRARY_VERSION = '4.1.0-alpha.0';
|
||||
|
||||
export const defaultConfig = {
|
||||
apiURL: 'https://api.revolt.chat',
|
||||
|
||||
@@ -116,4 +116,8 @@ export default class Channels extends Collection<Channel> {
|
||||
await this.client.req<'DELETE', '/channels/:id/messages/:id'>('DELETE', `/channels/${id}/messages/${message_id}` as any);
|
||||
this.client.emit('message/delete', message_id);
|
||||
}
|
||||
|
||||
async joinCall(id: string) {
|
||||
return await this.client.req<'POST', '/channels/:id/join_call'>('POST', `/channels/${id}/join_call` as any);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user