2020-08-13 01:02:33 +03:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @name DiscordTickets
|
|
|
|
* @author eartharoid <contact@eartharoid.me>
|
|
|
|
* @license GNU-GPLv3
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
const ChildLogger = require('leekslazylogger').ChildLogger;
|
|
|
|
const log = new ChildLogger();
|
2020-08-17 16:46:23 +03:00
|
|
|
const lineReader = require('line-reader');
|
|
|
|
const fs = require('fs');
|
|
|
|
const config = require('../../user/config');
|
2020-08-13 01:02:33 +03:00
|
|
|
|
|
|
|
module.exports.create = (client, channel) => {
|
|
|
|
|
2020-08-17 16:46:23 +03:00
|
|
|
// channel.members
|
2020-08-13 01:02:33 +03:00
|
|
|
|
2020-08-17 16:46:23 +03:00
|
|
|
if(config.transcripts.text.enabled) {
|
|
|
|
// text/channel.txt
|
|
|
|
}
|
2020-08-13 01:02:33 +03:00
|
|
|
|
2020-08-17 16:46:23 +03:00
|
|
|
if(config.transcripts.web.enabled) {
|
|
|
|
// raw/channel.log
|
|
|
|
}
|
|
|
|
|
2020-08-13 01:02:33 +03:00
|
|
|
};
|
|
|
|
|
2020-08-17 16:46:23 +03:00
|
|
|
|
2020-08-13 01:02:33 +03:00
|
|
|
module.exports.addMessage = (client, channel, message) => {
|
2020-08-17 16:46:23 +03:00
|
|
|
// if !entities.users.user, add
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.export = (client, channel) => {
|
|
|
|
let path = `user/transcripts/raw/${channel.id}.log`;
|
|
|
|
if(config.transcripts.web.enabled && fs.existsSync(path)) {
|
|
|
|
lineReader.eachLine(path, (line, last) => {
|
|
|
|
console.log(line);
|
|
|
|
//if raw id exists, overwrite previous
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-13 01:02:33 +03:00
|
|
|
|
2020-08-17 16:46:23 +03:00
|
|
|
/**
|
|
|
|
* @TODO users, roles, etc
|
|
|
|
* check channel.members again!
|
|
|
|
* */
|
2020-08-13 01:02:33 +03:00
|
|
|
};
|