Is your server dying? Now with discord fun it will be more active than ever! Use !topic, !roast, !joke or !pickup to start having fun
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let event = context.params.event;
const fun = require('fun-responses');
let topic = await fun.topic();
let roast = await fun.roast();
let joke = await fun.joke();
let pickup = await fun.pickup();
if (event.content === '!topic') {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `Here is your topic`,
description: `${topic}`,
color: 0x00ffff,
},
],
});
} else if (event.content === '!roast') {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `Here is your roast`,
description: `${roast}`,
color: 0x00ffff,
},
],
});
} else if (event.content === '!joke') {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `Here is your joke`,
description: `${joke}`,
color: 0x00ffff,
},
],
});
} else if (event.content === '!pickup') {
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `here is your pickup line :kiss:`,
description: `${pickup}`,
color: 0x00ffff,
},
],
});
}