When someone says -hello the bot will send an embed
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.content.startsWith('-hello')) {
await lib.discord.channels['@0.1.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `Hello welcome to our server `,
description: '',
color: 0x00ffff,
fields: [
{
name: `Pls read the rules`,
value: '\u200B',
},
{
name: `Be polite to everyone`,
value: '\u200B',
},
{
name: `If you need help pls call the admin, mod are owner`,
value: '\u200B',
},
],
image: {
url: `https://cdn.discordapp.com/attachments/879295720006492191/887868655310880898/hello-fb-logo.png`,
height: 0,
width: 0,
},
},
],
});
}