webamp/experiments/skin-database/DiscordWinstonTransport.js
2019-06-23 19:18:42 -04:00

17 lines
392 B
JavaScript

const { Transport } = require("winston");
class DiscordWinstonTransport extends Transport {
constructor(channel) {
super();
this._channel = channel;
}
async log(info, callback) {
const { message, ...rest } = info;
await this._channel.send(`${message}`);
// Perform the writing to the remote service
callback();
}
}
module.exports = DiscordWinstonTransport;