forked from Galactic/galactic-bot
51 lines
856 B
JavaScript
51 lines
856 B
JavaScript
|
const { stripIndents } = require('common-tags');
|
||
|
const { Observer } = require('../../../interfaces/');
|
||
|
|
||
|
class MessageLogger extends Observer {
|
||
|
|
||
|
constructor(client) {
|
||
|
|
||
|
super(client, {
|
||
|
name: 'messageLogger',
|
||
|
priority: 3,
|
||
|
guarded: true
|
||
|
});
|
||
|
|
||
|
this.client = client;
|
||
|
|
||
|
this.hooks = [
|
||
|
['messageDelete', this.onDelete.bind(this)],
|
||
|
['messageDeleteBulk', this.onBulk.bind(this)],
|
||
|
['messageUpdate', this.onEdit.bind(this)],
|
||
|
['message', this.onMessage.bind(this)]
|
||
|
];
|
||
|
|
||
|
}
|
||
|
|
||
|
async onDelete(message) {
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
//Bulk delete logs, gets a collection
|
||
|
async onBulk(messages) {
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
async onEdit(oldMsg, newMsg) {
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
//Image logging
|
||
|
async onMessage(message) {
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
module.exports = MessageLogger;
|