Ajout /lyrics, /papa et /parle + Fix /crack
This commit is contained in:
@@ -34,10 +34,13 @@ module.exports = {
|
||||
|
||||
let query = interaction.options.getString('jeu')
|
||||
let games = await search(query, headers1)
|
||||
if (!Array.isArray(games)) {
|
||||
if (games.toString() == "TypeError: Cannot read properties of undefined (reading 'split')") return interaction.followUp({ content: `J'ai rien trouvé pour "${query}" !` })
|
||||
else return interaction.followUp({ content: "Une erreur s'est produite ! ```" + games + "```" })
|
||||
}
|
||||
|
||||
let game
|
||||
if (games.length === 0) return await interaction.followUp({ content: `J'ai rien trouvé pour "${query}" !` })
|
||||
else if (games.length > 1) {
|
||||
if (games.length > 1) {
|
||||
games = games.slice(0, 9)
|
||||
let list = ''
|
||||
for (let i = 0; i < games.length; i++) list += `\n${i + 1}. ${games[i].name} (${games[i].link})`
|
||||
@@ -59,7 +62,6 @@ module.exports = {
|
||||
game = games[index]
|
||||
}
|
||||
else game = games[0]
|
||||
console.log(interaction.user.id)
|
||||
|
||||
let url = await repo(game, headers2)
|
||||
let file = await torrent(url, headers2)
|
||||
|
||||
Reference in New Issue
Block a user