Sends random suggesetions and messages in the server
// authenticates you with the API standard library
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const somethingRandomOnDiscord = require('something-random-on-discord').Random;
if (context.params.event.content.startsWith(`${process.env.PREFIX}advice`)) {
const {embed} = await somethingRandomOnDiscord.getAdvice();
embed.color = 0xffff00;
return await lib.discord.channels['@0.1.1'].messages.create({
channel_id: context.params.event.channel_id,
content: ``,
embed,
});
}
// Add more apps for your command here -
let messagePrompts = [
'https://play.google.com/store/apps/details?id=com.snapchat.android&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.instagram.android&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.pinterest&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.discord&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.spotify.music&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.google.android.youtube&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.netflix.mediaclient&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.whatsapp&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en_IN&gl=US',
'https://play.google.com/store/apps/details?id=com.disney.disneyplus&hl=en_IN&gl=US',
'',
'',
];
if (context.params.event.content.trim() === `${process.env.PREFIX}app`) {
// You can change the command
let messageChoice = Math.floor(Math.random() * messagePrompts.length);
let message = messagePrompts[messageChoice];
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${message}`,
});
}
// Add more books for your command here -
let messagePrompts1 = [
'https://en.wikipedia.org/wiki/The_Sun_Also_Rises',
'https://en.wikipedia.org/wiki/Fear_and_Loathing_in_Las_Vegas',
'https://en.wikipedia.org/wiki/Slaughterhouse-Five',
'https://en.wikipedia.org/wiki/Harry_Potter_and_the_Philosopher%27s_Stone',
'https://en.wikipedia.org/wiki/Harry_Potter_and_the_Chamber_of_Secrets',
'https://en.wikipedia.org/wiki/Harry_Potter_and_the_Prisoner_of_Azkaban',
'https://en.wikipedia.org/wiki/Harry_Potter_and_the_Goblet_of_Fire',
'https://en.wikipedia.org/wiki/Harry_Potter_and_the_Order_of_the_Phoenix',
'https://en.wikipedia.org/wiki/Harry_Potter_and_the_Half-Blood_Prince',
'https://en.wikipedia.org/wiki/Harry_Potter_and_the_Deathly_Hallows',
'https://en.wikipedia.org/wiki/Harry_Potter_and_the_Cursed_Child',
'https://en.wikipedia.org/wiki/War_and_Peace',
];
if (context.params.event.content.trim() === `${process.env.PREFIX}book`) {
// You can change the command
let messageChoice = Math.floor(Math.random() * messagePrompts1.length);
let message = messagePrompts1[messageChoice];
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${message}`,
});
}
const meow = require('random-meow');
if (context.params.event.content.startsWith(`${process.env.PREFIX}cat`)) {
meow()
.then((url) => console.log(url))
.catch(console.error);
let url = await meow();
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: context.params.event.channel_id,
content: `Cat Vibes!`,
tts: false,
embed: {
type: 'rich',
color: 0x00aaaa,
image: {
url: `${url}`,
},
},
});
}
if (context.params.event.content.startsWith(`${process.env.PREFIX}dog`)) {
let dogImageResponse = await lib.http.request['@1.1.5'].get({
url: `https://dog.ceo/api/breeds/image/random`,
});
await lib.discord.channels['@0.1.1'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `Doggy !`,
embed: {
color: 0x00aaaa,
image: {
url: dogImageResponse.data.message,
},
},
});
}
const randomSmiley = require('random-smiley');
if (context.params.event.content.startsWith(`${process.env.PREFIX}emoji`)) {
randomSmiley();
randomSmiley(3);
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: context.params.event.channel_id,
content: `${randomSmiley()}`,
});
}
console.log(randomSmiley);
// Add more food for your command here -
let messagePrompts2 = [
'https://www.eatthis.com/wp-content/uploads/sites/4/2019/11/whole-grain-pancake-stack.jpg?fit=1200%2C879&ssl=1',
'https://www.hungryforever.com/wp-content/uploads/2015/06/Featured-image-burgers-in-bangalore.jpg',
'https://imgmedia.lbb.in/media/2019/07/5d242ad8e93a896e5542da0d_1562651352251.jpg',
'https://imgstaticcontent.lbb.in/lbbnew/wp-content/uploads/sites/2/2018/04/16223011/Sanchez-i.jpg',
'https://health.clevelandclinic.org/wp-content/uploads/sites/3/2015/03/chocolateWhiteDark-454384771-770x533-1.jpg',
'https://img.etimg.com/thumb/msid-84939728,width-1200,height-900,imgsize-381352,resizemode-8,quality-100/magazines/panache/from-the-us-russia-to-india-an-ice-cream-bowl-has-a-long-political-history.jpg',
'https://c.ndtvimg.com/2019-09/juihv6c8_eggless-chocolate-chip-cookies_625x300_04_September_19.jpg',
'https://i0.wp.com/vegecravings.com/wp-content/uploads/2021/02/Mayonnaise-Sandwish-Recipe-Step-By-Step-Instructions-scaled.jpg?fit=2560%2C1890&quality=65&strip=all&ssl=1',
'https://media.wired.com/photos/6074aa620dfeac35a0cca839/master/pass/Science_donuts_465529983.jpg',
'https://www.wellplated.com/wp-content/uploads/2020/07/Creamy-Watermelon-Smoothie.jpg',
'https://cdn.shopify.com/s/files/1/0944/0726/files/funfetti-cake-1_large.jpg?12899557750417805525',
'https://www.mybakingaddiction.com/wp-content/uploads/2015/07/smoreswafflesundaes.jpg',
];
if (context.params.event.content.trim() === `${process.env.PREFIX}food`) {
// You can change the command
let messageChoice = Math.floor(Math.random() * messagePrompts2.length);
let message = messagePrompts2[messageChoice];
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${message}`,
});
}
// Add more games for your command here -
let messagePrompts3 = [
'https://www.minecraft.net/',
'https://supercell.com/en/games/brawlstars/',
'https://www.roblox.com/',
'https://www.innersloth.com/games/among-us/',
'https://playvalorant.com/en-us/',
'https://genshin.mihoyo.com/',
'https://www.ea.com/games/apex-legends',
'https://terraria.org/',
'https://www.fortnite.com/',
'http://slither.io/',
];
if (context.params.event.content.trim() === `${process.env.PREFIX}game`) {
// You can change the command
let messageChoice = Math.floor(Math.random() * messagePrompts3.length);
let message = messagePrompts3[messageChoice];
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${message}`,
});
}
// Add more movies for your command here -
let messagePrompts4 = [
'https://www.imdb.com/title/tt5433138/?ref_=adv_li_tt',
'https://www.imdb.com/title/tt6264654/?ref_=adv_li_tt',
'https://www.imdb.com/title/tt9376612/?ref_=adv_li_tt',
'https://www.imdb.com/title/tt7097896/?ref_=adv_li_tt',
'https://www.imdb.com/title/tt6334354/?ref_=adv_li_tt',
'https://www.imdb.com/title/tt10155932/?ref_=adv_li_tt',
'https://www.imdb.com/title/tt3228774/?ref_=adv_li_tt',
'https://www.imdb.com/title/tt3480822/?ref_=adv_li_tt',
'https://www.imdb.com/title/tt10872600/?ref_=adv_li_tt',
];
if (context.params.event.content.trim() === `${process.env.PREFIX}movie`) {
// You can change the command
let messageChoice = Math.floor(Math.random() * messagePrompts4.length);
let message = messagePrompts4[messageChoice];
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${message}`,
});
}
if (context.params.event.content.startsWith(`${process.env.PREFIX}num`))
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `Your random number is here:`,
description: `${Math.floor(Math.random() * 100000) + 1}`,
color: 0x00aaaa,
},
],
});
// Add more places for your command here -
let messagePrompts5 = [
'https://unsplash.com/s/photos/newzealand',
'https://unsplash.com/images/travel/paris',
'https://unsplash.com/s/photos/maui',
'https://unsplash.com/s/photos/london',
'https://unsplash.com/s/photos/rome',
'https://unsplash.com/s/photos/phuket%2C-thailand',
'https://unsplash.com/s/photos/tokyo-city',
'https://unsplash.com/s/photos/barcelona',
'https://unsplash.com/s/photos/maldives',
'https://unsplash.com/s/photos/banff',
'https://unsplash.com/images/travel/grand-canyon',
'https://unsplash.com/s/photos/sydney',
'https://unsplash.com/s/photos/machu-picchu',
'https://unsplash.com/s/photos/dubai',
'https://unsplash.com/s/photos/yosemite',
'https://unsplash.com/s/photos/yellowstone-national-park',
];
if (context.params.event.content.trim() === `${process.env.PREFIX}place`) {
// You can change the command
let messageChoice = Math.floor(Math.random() * messagePrompts5.length);
let message = messagePrompts5[messageChoice];
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${message}`,
});
}
// Add more songs for your command here -
let messagePrompts6 = [
'https://www.youtube.com/watch?v=pBGJnpig8wM',
'https://www.youtube.com/watch?v=VJ2rlci9PE0',
'https://www.youtube.com/watch?v=FM7MFYoylVs',
'https://www.youtube.com/watch?v=z6x0nGslk6w',
'https://www.youtube.com/watch?v=RE87rQkXdNw',
'https://www.youtube.com/watch?v=kPhpHvnnn0Q',
'https://www.youtube.com/watch?v=j6sSQq7a_Po',
'https://www.youtube.com/watch?v=25ROFXjoaAU',
'https://www.youtube.com/watch?v=SMs0GnYze34',
'https://www.youtube.com/watch?v=Q8sYncOdnKs',
'https://www.youtube.com/watch?v=38g9iKBS7oQ',
'https://www.youtube.com/watch?v=H5-qGFO138E',
'https://www.youtube.com/watch?v=JhYZWmS_LhM',
'https://www.youtube.com/watch?v=H9kcLTStfpQ',
'https://www.youtube.com/watch?v=cPyovQwFmhE',
'https://www.youtube.com/watch?v=5y_KJAg8bHI',
'https://www.youtube.com/watch?v=Itzk9W4YXw4',
'https://www.youtube.com/watch?v=tzMGDIU_-ow',
'https://www.youtube.com/watch?v=Bwed4JnNpfQ',
'https://www.youtube.com/watch?v=z7GCiVTlv04',
'https://www.youtube.com/watch?v=CSl6r8VScc0',
'https://www.youtube.com/watch?v=HUye_Vt3Ej8',
'https://www.youtube.com/watch?v=VpnuubCJjCU',
'https://www.youtube.com/watch?v=VNcBuZkxXmo',
'https://www.youtube.com/watch?v=OF04pKp-r9o',
'https://www.youtube.com/watch?v=8xG7mH8i-WE',
'https://www.youtube.com/watch?v=IZDReMwYM0Y',
'https://www.youtube.com/watch?v=3RfeSrrbxPI',
'https://www.youtube.com/watch?v=joxBujMflPk',
'https://www.youtube.com/watch?v=CeYuFSBkkVw',
'https://www.youtube.com/watch?v=CXKEdnasDto',
'https://www.youtube.com/watch?v=gm_WBeh4enw',
'https://www.youtube.com/watch?v=Dcj0mAQ_0Wk',
'https://www.youtube.com/watch?v=BerNfXSuvJ0',
'https://www.youtube.com/watch?v=TMSIR210mRg',
'https://www.youtube.com/watch?v=bfn9i5K2P6k',
'https://www.youtube.com/watch?v=EX7oWSbVbGY',
'https://www.youtube.com/watch?v=Dyheq5S1-GE',
'https://www.youtube.com/watch?v=2FuPsqMvKKA',
'https://www.youtube.com/watch?v=FVb3Bezrc0k',
'https://www.youtube.com/watch?v=PNozaFzqOvI',
'https://www.youtube.com/watch?v=vgT7in8VlGU',
'https://www.youtube.com/watch?v=b9y8kQSmS4M',
'https://www.youtube.com/watch?v=QXzC2eiHBG8',
'https://www.youtube.com/watch?v=t3qzrN5p5dM',
];
if (context.params.event.content.trim() === `${process.env.PREFIX}song`) {
// You can change the command
let messageChoice = Math.floor(Math.random() * messagePrompts6.length);
let message = messagePrompts6[messageChoice];
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${message}`,
});
}
if (context.params.event.content.toLowerCase() === `${process.env.PREFIX}help`) {
let server = await lib.discord.guilds['@0.1.0'].retrieve({
guild_id: context.params.event.guild_id // required
});
console.log(server.name);
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ` `,
embeds: [
{
type: 'rich',
title: ` Commands for ${server.name} `,
description: [
`\`${process.env.PREFIX}help\`: Shows you this menu`,
`\`${process.env.PREFIX}book\`: Sends a random book name in the server`,
`\`${process.env.PREFIX}song\`: Sends a random song in the server`,
`\`${process.env.PREFIX}movie\`: Send a random movie in the server`,
`\`${process.env.PREFIX}game\`: Send a random game in the server`,
`\`${process.env.PREFIX}emoji\`: Send a random emoji in the server`,
`\`${process.env.PREFIX}num\`: Send a random number in the server`,
`\`${process.env.PREFIX}cat\`: Send a random cat pic in the server`,
`\`${process.env.PREFIX}dog\`: Send a random dog pic in the server`,
`\`${process.env.PREFIX}app\`: Send a random app in the server`,
`\`${process.env.PREFIX}advice\`: Send a random advice in the server`,
`\`${process.env.PREFIX}place\`: Send a random place in the server`,
`\`${process.env.PREFIX}food\`: Send random food in the server`,
].join('\n'),
color: 0x00aaaa,
footer: {
text: `Done by Banana!#7031 `,
},
},
],
});
}