Command that converts your text into ascii! (m!ascii <text>). Made by toothless and weird.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const axios = require('axios');
if (
context.params.event.content.startsWith('m!asc') ||
context.params.event.content.startsWith('m!ascii')
) {
const args = context.params.event.content.split(' ').slice(1);
if (!args.length)
return lib.discord.channels['@0.1.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ` No arguments provided.`,
});
const {data} = await axios(
'https://artii.herokuapp.com/make?text=' +
encodeURIComponent(args.join('+').toLowerCase())
);
await lib.discord.channels['@0.1.1'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
tts: false,
embed: {
type: 'rich',
title: '',
description: `\`\`\`\n${data}\n\`\`\``,
color: 0xf9fb7a,
},
});
}