Merge pull request #14 from smyalygames/main

feat(arabot): sus command can now add users to the database
This commit is contained in:
Anthony 2022-07-22 02:37:42 +01:00 committed by GitHub
commit ab6196f25f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 136 additions and 93 deletions

204
package-lock.json generated
View File

@ -15,6 +15,7 @@
"@sapphire/ts-config": "^3.3.4",
"@sapphire/utilities": "^3.7.0",
"@types/node": "^18.0.3",
"cron": "^2.1.0",
"discord.js": "^13.8.1",
"dotenv": "^16.0.1",
"prisma": "^4.0.0",
@ -22,9 +23,9 @@
"typescript": "^4.7.4"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"eslint": "^8.19.0",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"eslint": "^8.20.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0"
}
@ -431,14 +432,14 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.6.tgz",
"integrity": "sha512-J4zYMIhgrx4MgnZrSDD7sEnQp7FmhKNOaqaOpaoQ/SfdMfRB/0yvK74hTnvH+VQxndZynqs5/Hn4t+2/j9bADg==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz",
"integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "5.30.6",
"@typescript-eslint/type-utils": "5.30.6",
"@typescript-eslint/utils": "5.30.6",
"@typescript-eslint/scope-manager": "5.30.7",
"@typescript-eslint/type-utils": "5.30.7",
"@typescript-eslint/utils": "5.30.7",
"debug": "^4.3.4",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.2.0",
@ -464,14 +465,14 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.6.tgz",
"integrity": "sha512-gfF9lZjT0p2ZSdxO70Xbw8w9sPPJGfAdjK7WikEjB3fcUI/yr9maUVEdqigBjKincUYNKOmf7QBMiTf719kbrA==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz",
"integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "5.30.6",
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/typescript-estree": "5.30.6",
"@typescript-eslint/scope-manager": "5.30.7",
"@typescript-eslint/types": "5.30.7",
"@typescript-eslint/typescript-estree": "5.30.7",
"debug": "^4.3.4"
},
"engines": {
@ -491,13 +492,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.6.tgz",
"integrity": "sha512-Hkq5PhLgtVoW1obkqYH0i4iELctEKixkhWLPTYs55doGUKCASvkjOXOd/pisVeLdO24ZX9D6yymJ/twqpJiG3g==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz",
"integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/visitor-keys": "5.30.6"
"@typescript-eslint/types": "5.30.7",
"@typescript-eslint/visitor-keys": "5.30.7"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -508,12 +509,12 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.6.tgz",
"integrity": "sha512-GFVVzs2j0QPpM+NTDMXtNmJKlF842lkZKDSanIxf+ArJsGeZUIaeT4jGg+gAgHt7AcQSFwW7htzF/rbAh2jaVA==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz",
"integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==",
"dev": true,
"dependencies": {
"@typescript-eslint/utils": "5.30.6",
"@typescript-eslint/utils": "5.30.7",
"debug": "^4.3.4",
"tsutils": "^3.21.0"
},
@ -534,9 +535,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.6.tgz",
"integrity": "sha512-HdnP8HioL1F7CwVmT4RaaMX57RrfqsOMclZc08wGMiDYJBsLGBM7JwXM4cZJmbWLzIR/pXg1kkrBBVpxTOwfUg==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz",
"integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@ -547,13 +548,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.6.tgz",
"integrity": "sha512-Z7TgPoeYUm06smfEfYF0RBkpF8csMyVnqQbLYiGgmUSTaSXTP57bt8f0UFXstbGxKIreTwQCujtaH0LY9w9B+A==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz",
"integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/visitor-keys": "5.30.6",
"@typescript-eslint/types": "5.30.7",
"@typescript-eslint/visitor-keys": "5.30.7",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -574,15 +575,15 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.6.tgz",
"integrity": "sha512-xFBLc/esUbLOJLk9jKv0E9gD/OH966M40aY9jJ8GiqpSkP2xOV908cokJqqhVd85WoIvHVHYXxSFE4cCSDzVvA==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz",
"integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.9",
"@typescript-eslint/scope-manager": "5.30.6",
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/typescript-estree": "5.30.6",
"@typescript-eslint/scope-manager": "5.30.7",
"@typescript-eslint/types": "5.30.7",
"@typescript-eslint/typescript-estree": "5.30.7",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
},
@ -598,12 +599,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.6.tgz",
"integrity": "sha512-41OiCjdL2mCaSDi2SvYbzFLlqqlm5v1ZW9Ym55wXKL/Rx6OOB1IbuFGo71Fj6Xy90gJDFTlgOS+vbmtGHPTQQA==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz",
"integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/types": "5.30.7",
"eslint-visitor-keys": "^3.3.0"
},
"engines": {
@ -856,6 +857,14 @@
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ=="
},
"node_modules/cron": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cron/-/cron-2.1.0.tgz",
"integrity": "sha512-Hq7u3P8y7UWYvsZbSKHHJDVG0VO9O7tp2qljxzTScelcTODBfCme8AIhnZsFwmQ9NchZ3hr2uNr+s3DSms7q6w==",
"dependencies": {
"luxon": "^1.23.x"
}
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -1074,9 +1083,9 @@
}
},
"node_modules/eslint": {
"version": "8.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz",
"integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==",
"version": "8.20.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz",
"integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==",
"dev": true,
"dependencies": {
"@eslint/eslintrc": "^1.3.0",
@ -2083,6 +2092,14 @@
"node": ">=10"
}
},
"node_modules/luxon": {
"version": "1.28.0",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-1.28.0.tgz",
"integrity": "sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ==",
"engines": {
"node": "*"
}
},
"node_modules/make-error": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
@ -3249,14 +3266,14 @@
}
},
"@typescript-eslint/eslint-plugin": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.6.tgz",
"integrity": "sha512-J4zYMIhgrx4MgnZrSDD7sEnQp7FmhKNOaqaOpaoQ/SfdMfRB/0yvK74hTnvH+VQxndZynqs5/Hn4t+2/j9bADg==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz",
"integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "5.30.6",
"@typescript-eslint/type-utils": "5.30.6",
"@typescript-eslint/utils": "5.30.6",
"@typescript-eslint/scope-manager": "5.30.7",
"@typescript-eslint/type-utils": "5.30.7",
"@typescript-eslint/utils": "5.30.7",
"debug": "^4.3.4",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.2.0",
@ -3266,52 +3283,52 @@
}
},
"@typescript-eslint/parser": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.6.tgz",
"integrity": "sha512-gfF9lZjT0p2ZSdxO70Xbw8w9sPPJGfAdjK7WikEjB3fcUI/yr9maUVEdqigBjKincUYNKOmf7QBMiTf719kbrA==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz",
"integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "5.30.6",
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/typescript-estree": "5.30.6",
"@typescript-eslint/scope-manager": "5.30.7",
"@typescript-eslint/types": "5.30.7",
"@typescript-eslint/typescript-estree": "5.30.7",
"debug": "^4.3.4"
}
},
"@typescript-eslint/scope-manager": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.6.tgz",
"integrity": "sha512-Hkq5PhLgtVoW1obkqYH0i4iELctEKixkhWLPTYs55doGUKCASvkjOXOd/pisVeLdO24ZX9D6yymJ/twqpJiG3g==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz",
"integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/visitor-keys": "5.30.6"
"@typescript-eslint/types": "5.30.7",
"@typescript-eslint/visitor-keys": "5.30.7"
}
},
"@typescript-eslint/type-utils": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.6.tgz",
"integrity": "sha512-GFVVzs2j0QPpM+NTDMXtNmJKlF842lkZKDSanIxf+ArJsGeZUIaeT4jGg+gAgHt7AcQSFwW7htzF/rbAh2jaVA==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz",
"integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==",
"dev": true,
"requires": {
"@typescript-eslint/utils": "5.30.6",
"@typescript-eslint/utils": "5.30.7",
"debug": "^4.3.4",
"tsutils": "^3.21.0"
}
},
"@typescript-eslint/types": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.6.tgz",
"integrity": "sha512-HdnP8HioL1F7CwVmT4RaaMX57RrfqsOMclZc08wGMiDYJBsLGBM7JwXM4cZJmbWLzIR/pXg1kkrBBVpxTOwfUg==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz",
"integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.6.tgz",
"integrity": "sha512-Z7TgPoeYUm06smfEfYF0RBkpF8csMyVnqQbLYiGgmUSTaSXTP57bt8f0UFXstbGxKIreTwQCujtaH0LY9w9B+A==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz",
"integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/visitor-keys": "5.30.6",
"@typescript-eslint/types": "5.30.7",
"@typescript-eslint/visitor-keys": "5.30.7",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -3320,26 +3337,26 @@
}
},
"@typescript-eslint/utils": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.6.tgz",
"integrity": "sha512-xFBLc/esUbLOJLk9jKv0E9gD/OH966M40aY9jJ8GiqpSkP2xOV908cokJqqhVd85WoIvHVHYXxSFE4cCSDzVvA==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz",
"integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.9",
"@typescript-eslint/scope-manager": "5.30.6",
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/typescript-estree": "5.30.6",
"@typescript-eslint/scope-manager": "5.30.7",
"@typescript-eslint/types": "5.30.7",
"@typescript-eslint/typescript-estree": "5.30.7",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
}
},
"@typescript-eslint/visitor-keys": {
"version": "5.30.6",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.6.tgz",
"integrity": "sha512-41OiCjdL2mCaSDi2SvYbzFLlqqlm5v1ZW9Ym55wXKL/Rx6OOB1IbuFGo71Fj6Xy90gJDFTlgOS+vbmtGHPTQQA==",
"version": "5.30.7",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz",
"integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.30.6",
"@typescript-eslint/types": "5.30.7",
"eslint-visitor-keys": "^3.3.0"
}
},
@ -3525,6 +3542,14 @@
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ=="
},
"cron": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cron/-/cron-2.1.0.tgz",
"integrity": "sha512-Hq7u3P8y7UWYvsZbSKHHJDVG0VO9O7tp2qljxzTScelcTODBfCme8AIhnZsFwmQ9NchZ3hr2uNr+s3DSms7q6w==",
"requires": {
"luxon": "^1.23.x"
}
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -3688,9 +3713,9 @@
"dev": true
},
"eslint": {
"version": "8.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz",
"integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==",
"version": "8.20.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz",
"integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==",
"dev": true,
"requires": {
"@eslint/eslintrc": "^1.3.0",
@ -4453,6 +4478,11 @@
"yallist": "^4.0.0"
}
},
"luxon": {
"version": "1.28.0",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-1.28.0.tgz",
"integrity": "sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ=="
},
"make-error": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",

View File

@ -31,6 +31,7 @@
"@sapphire/ts-config": "^3.3.4",
"@sapphire/utilities": "^3.7.0",
"@types/node": "^18.0.3",
"cron": "^2.1.0",
"discord.js": "^13.8.1",
"dotenv": "^16.0.1",
"prisma": "^4.0.0",
@ -38,9 +39,9 @@
"typescript": "^4.7.4"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"eslint": "^8.19.0",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"eslint": "^8.20.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0"
}

View File

@ -35,6 +35,7 @@ model User {
trusted Boolean @default(false)
activist Boolean @default(false)
plus Boolean @default(false)
notVegan Boolean @default(false)
vegCurious Boolean @default(false)
convinced Boolean @default(false)
muted Boolean @default(false)

View File

@ -65,11 +65,9 @@ export class SusCommand extends Command {
switch (subcommand) {
case 'add': {
return await this.addNote(interaction);
break;
}
case 'view': {
return await this.listNote(interaction);
break;
}
}
@ -89,6 +87,17 @@ export class SusCommand extends Command {
const note = interaction.options.getString('note')!;
// Add the data to the database
// Check if the user exists on the database
const userGuildMember = interaction.guild!.members.cache.get(user.id)!;
if (!await userExists(userGuildMember)) {
await addExistingUser(userGuildMember);
}
// Check if the mod exists on the database
const modGuildMember = interaction.guild!.members.cache.get(mod.id)!;
if (!await userExists(modGuildMember)) {
await addExistingUser(modGuildMember);
}
// TODO check if user is on the database and if not, add them to the database
await addToDatabase(user.id, mod.id, note);
@ -112,7 +121,7 @@ export class SusCommand extends Command {
const noteEmbed = new MessageEmbed()
.setColor('#0099ff')
.setTitle(`Sus notes for ${user.username}`)
// .setThumbnail(user.avatar!)
.setThumbnail(user.avatarURL()!)
.addField(`Moderator: ${mod} Date: ${notes[notes.length - 1].time}`, notes[notes.length - 1].note);
// Sends the notes to the user

View File

@ -64,6 +64,7 @@ export async function addExistingUser(user: GuildMember) {
const hasVegan = user.roles.cache.has(IDs.roles.vegan.vegan);
const hasActivist = user.roles.cache.has(IDs.roles.vegan.activist);
const hasPlus = user.roles.cache.has(IDs.roles.vegan.plus);
const hasNotVegan = user.roles.cache.has(IDs.roles.nonvegan.nonvegan);
const hasVegCurious = user.roles.cache.has(IDs.roles.nonvegan.vegCurious);
const hasConvinced = user.roles.cache.has(IDs.roles.nonvegan.convinced);
const hasTrusted = user.roles.cache.has(IDs.roles.trusted);
@ -77,6 +78,7 @@ export async function addExistingUser(user: GuildMember) {
trusted: hasTrusted,
activist: hasActivist,
plus: hasPlus,
notVegan: hasNotVegan,
vegCurious: hasVegCurious,
convinced: hasConvinced,
muted: hasMuted,