Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/commands/fun/bigtext.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = {
})
.join(' ');

//hello
// hello

await interaction.reply(`${bigTextReactions}`);
},
Expand Down
30 changes: 30 additions & 0 deletions src/commands/general/quran.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* eslint-disable comma-dangle */
/* eslint-disable indent */
/* eslint-disable object-curly-spacing */
const fetch = (...args) =>
import('node-fetch').then(({ default: fetch }) => fetch(...args));
const { MessageEmbed } = require('discord.js');

module.exports = {
name: 'verse',
description: 'Get a random verse from quran',
required: true,
disabled: false,
execute: async (client, interaction, args) => {
const verse = Math.floor(Math.random() * 623);
const url = `https://www.easyquran.com/segments-jpg/seg/${verse}.jpg`;

try {
const res = await fetch(url);
const photoURL = await res.url;
const ImageEmbed = new MessageEmbed().setImage(photoURL).setTimestamp();
await interaction.reply({ embeds: [ImageEmbed] });
} catch (error) {
const adviceEmbed = new MessageEmbed()
.setTitle('No pictures for you (┛ಠ_ಠ)┛彡┻━┻')
.setColor('#ff2c40')
.setTimestamp();
await interaction.reply({ embeds: [adviceEmbed] });
}
}
};