forked from Supositware/Haha-Yes
fixed it hopefully
This commit is contained in:
parent
48400cad57
commit
e3a7a8fe9c
1 changed files with 7 additions and 3 deletions
|
@ -8,7 +8,7 @@ module.exports = class printCommand extends Command {
|
||||||
aliases: ['dundermiffline', 'wastedevinkandmoney'],
|
aliases: ['dundermiffline', 'wastedevinkandmoney'],
|
||||||
group: 'fun',
|
group: 'fun',
|
||||||
memberName: 'print',
|
memberName: 'print',
|
||||||
description: 'print whatever you want using the dev printer ! ( yea really, send a feedback requesting the image and i\'il send it to you.',
|
description: 'print whatever you want using the dev printer ! ( yea really, send a feedback requesting the image and i\'il send it to you. )',
|
||||||
throttling: {
|
throttling: {
|
||||||
usages: 1,
|
usages: 1,
|
||||||
duration: 86400,
|
duration: 86400,
|
||||||
|
@ -24,15 +24,19 @@ module.exports = class printCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
|
const channel = this.client.channels.get(printChannel);
|
||||||
|
|
||||||
|
|
||||||
printer.printDirect({data:`Printed by: ${message.author.username}\n\n${text}`
|
printer.printDirect({data:`Printed by: ${message.author.username}\n\n${text}`
|
||||||
, type: 'TEXT' // type: RAW, TEXT, PDF, JPEG, .. depends on platform
|
, type: 'TEXT' // type: RAW, TEXT, PDF, JPEG, .. depends on platform
|
||||||
, success:function(jobID){
|
, success:function(jobID){
|
||||||
console.log("sent to printer with ID: "+jobID);
|
console.log("sent to printer with ID: "+jobID);
|
||||||
message.say("Printing now! ( You will receive your print shortly ( if the dev isint sleeping that is ))");
|
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")}
|
, error:function(err){console.log(err); message.say("An error has occured, the printer is most likely disconnected, try again later")}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
channel.send(`${message.author.username} (${message.author.id}) Asked for a print with the following text: ${text}`);
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in a new issue