feat: allow bots to message users and vice-versa

This commit is contained in:
Paul Makles
2022-05-07 15:04:02 +01:00
parent 19e6df9dd9
commit ef26fe3fe6
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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",
+4
View File
@@ -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;
}