Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions modules/ping-protection/models/UserPingPreference.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const {
DataTypes,
Model
} = require('sequelize');

module.exports = class PingProtectionUserPingPreference extends Model {
static init(sequelize) {
return super.init({
userId: {
type: DataTypes.STRING,
allowNull: false,
unique: true
},
disabledUntil: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null
}
}, {
tableName: 'ping_protection_user_preferences',
timestamps: true,
sequelize
});
}
};

module.exports.config = {
name: 'UserPingPreference',
module: 'ping-protection'
};
2 changes: 1 addition & 1 deletion modules/ping-protection/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"AutoModerationExecution"
],
"intentReasons": {
"GuildMembers": "Enumerates the holders of protected roles to detect unwanted mentions.",
"GuildMembers": "Checks members to see if they are protected from pings and if they are allowed to ping such users.",
"MessageContent": "Scans message content and mentions to catch pings of protected roles and users."
}
}
Loading