-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
104 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
const Discord = require("discord.js"); | ||
const axios = require("axios"); | ||
const axios = require("axios"), | ||
Discord = require("discord.js"); | ||
|
||
|
||
module.exports.run = async (bot, message) => | ||
{ | ||
const number_random = Math.floor(Math.random() * 495), | ||
|
||
getInfo = async () => | ||
{ | ||
let response = await axios.get(`https://api.falehafez.org/`); | ||
return response.data; | ||
}, | ||
|
||
data = await getInfo(), | ||
|
||
poem = `${data.poem[0]} — ${data.poem[1]}\n> ${data.poem[2]} — ${data.poem[3]}\n> ${data.poem[4]} — ${data.poem[5]}\n> ${data.poem[6]} — ${data.poem[7]}\n> ${data.poem[8]} — ${data.poem[9]}\n> ${data.poem[10]} — ${data.poem[11]}`, | ||
|
||
embed1 = new Discord.MessageEmbed() | ||
.setColor("#fffff0") | ||
.setDescription(`📔 **(${number_random}) غزلیات حافظ** 📔`) | ||
.addField( | ||
"**: شعر 📔**", | ||
`> ${poem}` | ||
) | ||
|
||
.setImage( | ||
"https://cdn.discordapp.com/attachments/776425421968244768/832315187830849576/Hafez.jpg" | ||
) | ||
.setFooter( | ||
" : درخواست شده توسط " + message.member.displayName, | ||
message.author.displayAvatarURL({ dynamic: true }) | ||
); | ||
await message.channel.send(embed1); | ||
|
||
const number_random = Math.floor(Math.random() * 495), | ||
|
||
getInfo = async () => | ||
{ | ||
let response = await axios.get(`https://api.falehafez.org/`); | ||
return response.data; | ||
}, | ||
|
||
data = await getInfo(), | ||
|
||
poem = `${data.poem[0]} — ${data.poem[1]}\n> ${data.poem[2]} — ${data.poem[3]}\n> ${data.poem[4]} — ${data.poem[5]}\n> ${data.poem[6]} — ${data.poem[7]}\n> ${data.poem[8]} — ${data.poem[9]}\n> ${data.poem[10]} — ${data.poem[11]}`, | ||
|
||
embed1 = new Discord.MessageEmbed() | ||
.setColor("#fffff0") | ||
.setDescription(`📔 **(${number_random}) غزلیات حافظ** 📔`) | ||
.addField( | ||
"**: شعر 📔**", | ||
`> ${poem}` | ||
) | ||
|
||
.setImage( | ||
"https://cdn.discordapp.com/attachments/776425421968244768/832315187830849576/Hafez.jpg" | ||
) | ||
.setFooter( | ||
" : درخواست شده توسط " + message.member.displayName, | ||
message.author.displayAvatarURL({ dynamic: true }) | ||
); | ||
await message.channel.send(embed1); | ||
}; | ||
|
||
module.exports.help = | ||
{ | ||
name: "ghazal", | ||
aliases: ["poem"] | ||
}; | ||
name: "ghazal", | ||
aliases: ["poem"] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
const Discord = require("discord.js"); | ||
const axios = require("axios"); | ||
const axios = require("axios"), | ||
Discord = require("discord.js"); | ||
|
||
|
||
module.exports.run = async (bot, message) => | ||
{ | ||
const numberRandom = Math.floor(Math.random() * 495), | ||
|
||
getInfo = async () => | ||
{ | ||
let response = await axios.get(`https://api.falehafez.org/`); | ||
return response.data; | ||
}, | ||
|
||
data = await getInfo(), | ||
|
||
poem = `${data.poem[0]} — ${data.poem[1]}`, | ||
|
||
repliesPic = | ||
[ | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576634489929728/782482961-talab-org.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576633667715112/1.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576633901678602/b5759593fdad5a8d.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576634078625832/ef6cdaaf78ea9696.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576634279428136/Hamgardi_0349zvzbc89_resize.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832577287551451177/1660401.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832577287693533194/e67ebce5d3751d45.png" | ||
], | ||
|
||
ranNum = Math.floor(Math.random() * 7), | ||
|
||
image = repliesPic[ranNum]; | ||
|
||
|
||
const embed1 = new Discord.MessageEmbed() | ||
.setColor("#fffff0") | ||
.setDescription(`📔 **(${numberRandom}) عکس حافظ** 📔`) | ||
.addField( | ||
"**: شعر 📔**", | ||
`> ${poem}` | ||
) | ||
.setImage(image) | ||
.setFooter( | ||
" : درخواست شده توسط " + message.member.displayName, | ||
message.author.displayAvatarURL({ dynamic: true }) | ||
); | ||
|
||
await message.channel.send(embed1); | ||
const numberRandom = Math.floor(Math.random() * 495), | ||
|
||
getInfo = async () => | ||
{ | ||
let response = await axios.get(`https://api.falehafez.org/`); | ||
return response.data; | ||
}, | ||
|
||
data = await getInfo(), | ||
|
||
poem = `${data.poem[0]} — ${data.poem[1]}`, | ||
|
||
repliesPic = | ||
[ | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576634489929728/782482961-talab-org.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576633667715112/1.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576633901678602/b5759593fdad5a8d.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576634078625832/ef6cdaaf78ea9696.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832576634279428136/Hamgardi_0349zvzbc89_resize.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832577287551451177/1660401.jpg", | ||
"https://cdn.discordapp.com/attachments/760896469023850588/832577287693533194/e67ebce5d3751d45.png" | ||
], | ||
|
||
ranNum = Math.floor(Math.random() * 7), | ||
|
||
image = repliesPic[ranNum], | ||
|
||
embed = new Discord.MessageEmbed() | ||
.setColor("#fffff0") | ||
.setDescription(`📔 **(${numberRandom}) عکس حافظ** 📔`) | ||
.addField( | ||
"**: شعر 📔**", | ||
`> ${poem}` | ||
) | ||
.setImage(image) | ||
.setFooter( | ||
" : درخواست شده توسط " + message.member.displayName, | ||
message.author.displayAvatarURL({ dynamic: true }) | ||
); | ||
|
||
await message.channel.send(embed); | ||
}; | ||
|
||
module.exports.help = | ||
{ | ||
name: "", | ||
aliases: ["p"] | ||
name: "", | ||
aliases: ["p"] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters