user
This commit is contained in:
parent
f5e4c11b99
commit
5842448f1e
22
src/server/structures/User.js
Normal file
22
src/server/structures/User.js
Normal file
@ -0,0 +1,22 @@
|
||||
class User {
|
||||
|
||||
static defaultPermissions = {};
|
||||
|
||||
constructor (db, data) {
|
||||
|
||||
this.id = data._id;
|
||||
this._db = db;
|
||||
|
||||
this.permissions = { ...User.defaultPermissions, ...data.permissions };
|
||||
|
||||
}
|
||||
|
||||
hasPermission (perm) {
|
||||
|
||||
return this.permissions[perm];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = User;
|
3
src/server/structures/index.js
Normal file
3
src/server/structures/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
User: require('./User')
|
||||
};
|
Loading…
Reference in New Issue
Block a user