exports.exec = async (client, message, args) => {
// Fires Error message that the command wasn't ran correctly.
if (args.length < 1) {
return message.channel.send({
embed: {
color: 0,
description: `${message.author} Please input something to be generated into the QR code.`
}
});
}
// Fires Error message that the command wasn't ran correctly.
var text = args.join(' ');
var qr_generator = `https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${text}`;
message.channel.send(qr_generator);
};
Hey guys, above is the command, it works though, when attempting to add several words, i-e. "hello world it catches only the hello, after putting a space it breaks. I'm not entirely sure how to allow spaces.
Any help is appreciated.
Example -
