I saw QR-code then what? Time to do Barcode! try use !barcode <url/text>
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.content.split(` `)[1]) {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `There you go :D`,
description: '',
color: 0x00ffff,
image: {
url: `https://barcode.tec-it.com/barcode.ashx?data=${
context.params.event.content.split(` `)[1]
}&code=Code128&eclevel=L`,
height: 0,
width: 0,
},
},
],
});
} else {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `Error`,
description: `Url/Text not found, please try \`!barcode \``,
color: 0x00ffff,
},
],
});
}