Files
dysnomia/lib/structures/PermissionOverwrite.js
TTtie dc3129e2a4 refactor: switch to ESLint flat config, add JSDoc linting (#147)
This commit switches Dysnomia over to ESLint flat config for
futureproofing and better maintainability. For the most part, the
codebase will pass the test suite, apart from a few exceptions
introduced by the stylistic plugin which I believe are reasonable to
include.

Additionally, JSDoc linting was added to maintain proper 
alignment of various features.
2024-08-02 18:56:44 +00:00

33 lines
668 B
JavaScript

"use strict";
const Permission = require("./Permission");
/**
* Represents a permission overwrite
* @extends Permission
*/
class PermissionOverwrite extends Permission {
constructor(data) {
super(data.allow, data.deny);
/**
* The ID of the overwrite
* @type {String}
*/
this.id = data.id;
/**
* The type of the overwrite, either 1 for "member" or 0 for "role"
* @type {Number}
*/
this.type = data.type;
}
toJSON(props = []) {
return super.toJSON([
"type",
...props
]);
}
}
module.exports = PermissionOverwrite;