From 48400cad570af497cd1f07b556b544634caececa Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Thu, 22 Nov 2018 20:28:27 +0100 Subject: [PATCH] send who printed to the channel --- commands/fun/print.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/fun/print.js b/commands/fun/print.js index 3d090cf7..f15d7fb1 100644 --- a/commands/fun/print.js +++ b/commands/fun/print.js @@ -1,5 +1,6 @@ const { Command } = require('discord.js-commando'); const printer = require('printer'); +const { printChannel } = require('../../config.json') module.exports = class printCommand extends Command { constructor(client) { super(client, { @@ -27,7 +28,9 @@ module.exports = class printCommand extends Command { , type: 'TEXT' // type: RAW, TEXT, PDF, JPEG, .. depends on platform , success:function(jobID){ console.log("sent to printer with ID: "+jobID); - message.say("Printing now! ( ask with 'haha feedback ' if you want to see it !)") + message.say("Printing now! ( You will receive your print shortly ( if the dev isint sleeping that is ))"); + const channel = this.client.channels.get(printChannel); + channel.send(`${message.author.username} (${message.author.id}) Asked for a print with the following text: ${text}`); } , error:function(err){console.log(err); message.say("An error has occured, the printer is most likely disconnected, try again later")} });