galactic-bot/structure/client/components/settings/moderation/AutoModeration.js
2020-08-31 18:04:54 +03:00

47 lines
1.1 KiB
JavaScript

const { Setting } = require('../../../../interfaces/');
class AutoModerationSetting extends Setting {
constructor(client) {
super(client, {
name: 'autoModeration',
module: 'moderation',
aliases: ['automod'],
resolve: 'GUILD',
default: {
autoModeration: {
enabled: true,
thresholds: {
'10': {
type: 'MUTE',
length: 60
},
'20': {
type: 'KICK'
}
}
}
},
archivable: false
});
}
async handle(message) {
return {
msg: message.format('S_SILENT_SUCCESS', { value: "fuck yourself" }),
error: false
};
}
fields(guild) {
return {
name: "》 Status",
value: guild.format('SETTING_STATUS', { bool: Boolean(guild._settings.silent) }, true)
};
}
}
module.exports = AutoModerationSetting;