2020-04-17 09:03:53 +02:00
|
|
|
const { Infraction } = require('../interfaces/');
|
|
|
|
|
2020-06-02 12:09:28 +02:00
|
|
|
class Warn extends Infraction {
|
2020-04-17 09:03:53 +02:00
|
|
|
|
|
|
|
constructor(client, opts = {}) {
|
|
|
|
|
|
|
|
super(client, {
|
|
|
|
type: 'WARN',
|
|
|
|
targetType: 'user',
|
2020-07-04 12:23:10 +02:00
|
|
|
message: opts.message,
|
2020-04-17 09:03:53 +02:00
|
|
|
executor: opts.executor.user,
|
|
|
|
target: opts.target.user,
|
|
|
|
reason: opts.reason || 'N/A',
|
|
|
|
guild: opts.guild,
|
|
|
|
channel: opts.channel,
|
2020-07-04 12:23:10 +02:00
|
|
|
silent: opts.silent,
|
|
|
|
color: 0xffe15c,
|
2020-04-17 09:03:53 +02:00
|
|
|
dictionary: {
|
|
|
|
past: 'warned',
|
|
|
|
present: 'warn'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
this.client = client;
|
|
|
|
|
|
|
|
this.member = opts.target;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-07-04 12:23:10 +02:00
|
|
|
async execute() {
|
|
|
|
await this.handle();
|
|
|
|
return this._succeed();
|
2020-04-17 09:03:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-06-02 12:09:28 +02:00
|
|
|
module.exports = Warn;
|