Make The Bot Copy You. Whatever you say after the prefix command, the bot will put it in an embed and post it in the same channel.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let event = context.params.event;
if (event.content.startsWith(`!copyme`)) {
let text = event.content.split(` `);
let suggestion = text.slice(1).join(` `);
if (!suggestion) {
await lib.discord.channels['@0.1.0'].messages.create({
channel_id: event.channel_id,
content: `I need you to say something. Then only will I be able to copy you.`,
});
} else {
await lib.discord.channels['@0.1.0'].messages.destroy({
channel_id: event.channel_id,
message_id: event.id,
});
let suggest = await lib.discord.channels['@0.1.0'].messages.create({
channel_id: context.params.event.channel_id,
content: ``,
embed: {
title: `Anonymous made me copy him/her!`,
type: 'rich',
color: 0x00ff00, //bright green (i love this color). You can change it to anything you want.
footer: {
text: `[Your Bot] | Devoloped By [Your Name]`, //replace this with your bot name and your name...
},
description: suggestion,
},
});
}
}