no more crash
This commit is contained in:
		@@ -3,7 +3,9 @@ import { SlashCommandBuilder} from "discord.js";
 | 
				
			|||||||
export const data = new SlashCommandBuilder()
 | 
					export const data = new SlashCommandBuilder()
 | 
				
			||||||
    .setName('femboy')
 | 
					    .setName('femboy')
 | 
				
			||||||
    .setDescription('femboy penis porno')
 | 
					    .setDescription('femboy penis porno')
 | 
				
			||||||
export async function execute(interaction, defer=false) {
 | 
					export async function execute(interaction, defer=false, maxTry=10) {
 | 
				
			||||||
 | 
					    maxTry--
 | 
				
			||||||
 | 
					    if (maxTry === 0) return
 | 
				
			||||||
    if (!defer) await interaction.deferReply()
 | 
					    if (!defer) await interaction.deferReply()
 | 
				
			||||||
    if (interaction.channel.nsfw) {
 | 
					    if (interaction.channel.nsfw) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -29,14 +31,16 @@ export async function execute(interaction, defer=false) {
 | 
				
			|||||||
            .then(response => response.json())
 | 
					            .then(response => response.json())
 | 
				
			||||||
            .then(response => {
 | 
					            .then(response => {
 | 
				
			||||||
                let i = Math.floor(Math.random() * response.length)
 | 
					                let i = Math.floor(Math.random() * response.length)
 | 
				
			||||||
                let ip = Math.floor(Math.random() * response[i].attachments.length)
 | 
					                if (response.length === 0 || response[i].attachments.length === 0) {
 | 
				
			||||||
                if (!response.attachments || response.length === 0 || response[i].attachments.length === 0) {
 | 
					 | 
				
			||||||
                    return null
 | 
					                    return null
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                let ip = Math.floor(Math.random() * response[i].attachments.length)
 | 
				
			||||||
                return "https://coomer.su" + response[i].attachments[ip].path
 | 
					                return "https://coomer.su" + response[i].attachments[ip].path
 | 
				
			||||||
 | 
					            }).catch(e => {
 | 
				
			||||||
 | 
					                console.log(e)
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
        if (!getLink) {
 | 
					        if (!getLink) {
 | 
				
			||||||
            return execute(interaction, true)
 | 
					            return execute(interaction, true, maxTry)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        await fetch(getLink, options)
 | 
					        await fetch(getLink, options)
 | 
				
			||||||
@@ -48,6 +52,8 @@ export async function execute(interaction, defer=false) {
 | 
				
			|||||||
                        name: 'image.png'
 | 
					                        name: 'image.png'
 | 
				
			||||||
                    }]
 | 
					                    }]
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					            }).catch(e => {
 | 
				
			||||||
 | 
					                console.log(e)
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        interaction.reply({
 | 
					        interaction.reply({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,9 @@ import { SlashCommandBuilder} from "discord.js";
 | 
				
			|||||||
export const data = new SlashCommandBuilder()
 | 
					export const data = new SlashCommandBuilder()
 | 
				
			||||||
    .setName('porn')
 | 
					    .setName('porn')
 | 
				
			||||||
    .setDescription('reel women prono')
 | 
					    .setDescription('reel women prono')
 | 
				
			||||||
export async function execute(interaction, defer=false) {
 | 
					export async function execute(interaction, defer=false, maxTry=10) {
 | 
				
			||||||
 | 
					    maxTry--
 | 
				
			||||||
 | 
					    if (maxTry === 0) return
 | 
				
			||||||
    if (!defer) await interaction.deferReply()
 | 
					    if (!defer) await interaction.deferReply()
 | 
				
			||||||
    if (interaction.channel.nsfw) {
 | 
					    if (interaction.channel.nsfw) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -45,14 +47,16 @@ export async function execute(interaction, defer=false) {
 | 
				
			|||||||
            .then(response => response.json())
 | 
					            .then(response => response.json())
 | 
				
			||||||
            .then(response => {
 | 
					            .then(response => {
 | 
				
			||||||
                let i = Math.floor(Math.random() * response.length)
 | 
					                let i = Math.floor(Math.random() * response.length)
 | 
				
			||||||
                let ip = Math.floor(Math.random() * response[i].attachments.length)
 | 
					                if (response.length === 0 || response[i].attachments.length === 0) {
 | 
				
			||||||
                if (!response.attachments || response.length === 0 || response[i].attachments.length === 0) {
 | 
					 | 
				
			||||||
                    return null
 | 
					                    return null
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                let ip = Math.floor(Math.random() * response[i].attachments.length)
 | 
				
			||||||
                return "https://coomer.su" + response[i].attachments[ip].path
 | 
					                return "https://coomer.su" + response[i].attachments[ip].path
 | 
				
			||||||
 | 
					            }).catch(e => {
 | 
				
			||||||
 | 
					                console.log(e)
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
        if (!getLink) {
 | 
					        if (!getLink) {
 | 
				
			||||||
            return execute(interaction, true)
 | 
					            return execute(interaction, true, maxTry)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        await fetch(getLink, options)
 | 
					        await fetch(getLink, options)
 | 
				
			||||||
@@ -64,6 +68,8 @@ export async function execute(interaction, defer=false) {
 | 
				
			|||||||
                        name: 'image.png'
 | 
					                        name: 'image.png'
 | 
				
			||||||
                    }]
 | 
					                    }]
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					            }).catch(e => {
 | 
				
			||||||
 | 
					                console.log(e)
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        interaction.reply({
 | 
					        interaction.reply({
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user