mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-20 20:16:06 -04:00
feat: allow bots to message users and vice-versa
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "revolt.js",
|
||||
"version": "6.0.0-rc.25",
|
||||
"version": "6.0.0-rc.26",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"module": "esm/index.js",
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
export const LIBRARY_VERSION = "6.0.0-rc.25";
|
||||
export const LIBRARY_VERSION = "6.0.0-rc.26";
|
||||
|
||||
export const defaultConfig = {
|
||||
apiURL: "https://api.revolt.chat",
|
||||
|
||||
@@ -211,6 +211,10 @@ export class User {
|
||||
(member) => member._id.user === this.client.user!._id,
|
||||
)
|
||||
) {
|
||||
if (this.client.user?.bot || this.bot) {
|
||||
permissions |= UserPermission.SendMessage;
|
||||
}
|
||||
|
||||
permissions |= UserPermission.Access | UserPermission.ViewProfile;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user