change the check
This commit is contained in:
		@@ -30,7 +30,7 @@ export async function execute(interaction, defer=false) {
 | 
			
		||||
            .then(response => {
 | 
			
		||||
                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 "https://coomer.su" + response[i].attachments[ip].path
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@ export async function execute(interaction, defer=false) {
 | 
			
		||||
            .then(response => {
 | 
			
		||||
                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 "https://coomer.su" + response[i].attachments[ip].path
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user