Fix messages, durr
This commit is contained in:
		
							parent
							
								
									c0ed2bf7b2
								
							
						
					
					
						commit
						78c22c3075
					
				
							
								
								
									
										17
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								index.js
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -193,7 +193,6 @@ Client.on("interactionCreate", async (interaction) => {
 | 
			
		|||
					userId = interaction.options.get("user").value
 | 
			
		||||
					reason = interaction.options.get("reason").value
 | 
			
		||||
					userInfo = await noblox.getPlayerInfo(userId)
 | 
			
		||||
					console.log(userInfo)
 | 
			
		||||
					userThumbnail = await noblox.getPlayerThumbnail([userId], 720, "png", false, "body")
 | 
			
		||||
					db.get("SELECT * FROM bans WHERE userId = ?", [userId], (err, row) => {
 | 
			
		||||
						if (err) {
 | 
			
		||||
| 
						 | 
				
			
			@ -234,7 +233,7 @@ Client.on("interactionCreate", async (interaction) => {
 | 
			
		|||
												}
 | 
			
		||||
											]
 | 
			
		||||
										}
 | 
			
		||||
										return interaction.reply({ embeds: [embed] });
 | 
			
		||||
										return interaction.reply({ embeds: [embed], ephemeral: true });
 | 
			
		||||
									}
 | 
			
		||||
								})
 | 
			
		||||
							} else if(row.banned === 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -268,11 +267,11 @@ Client.on("interactionCreate", async (interaction) => {
 | 
			
		|||
												}
 | 
			
		||||
											]
 | 
			
		||||
										}
 | 
			
		||||
										return interaction.reply({ embeds: [embed] });
 | 
			
		||||
										return interaction.reply({ embeds: [embed], ephemeral: true });
 | 
			
		||||
									}
 | 
			
		||||
								})
 | 
			
		||||
							} else {
 | 
			
		||||
								interaction.repl({
 | 
			
		||||
								interaction.reply({
 | 
			
		||||
									content: "User is already banned.",
 | 
			
		||||
									ephemeral: true
 | 
			
		||||
								})
 | 
			
		||||
| 
						 | 
				
			
			@ -284,7 +283,6 @@ Client.on("interactionCreate", async (interaction) => {
 | 
			
		|||
					// If the user is banned, unban them
 | 
			
		||||
					userId = await interaction.options.get("user").value
 | 
			
		||||
					userInfo = await noblox.getPlayerInfo(userId)
 | 
			
		||||
					console.log(userInfo)
 | 
			
		||||
					userThumbnail = await noblox.getPlayerThumbnail([userId], 720, "png", false, "body")
 | 
			
		||||
 | 
			
		||||
					db.get("SELECT * FROM bans WHERE userId = ?", [userId], (err, row) => {
 | 
			
		||||
| 
						 | 
				
			
			@ -333,6 +331,7 @@ Client.on("interactionCreate", async (interaction) => {
 | 
			
		|||
												}
 | 
			
		||||
											]
 | 
			
		||||
										}
 | 
			
		||||
										return interaction.reply({ embeds: [embed], ephemeral: true });
 | 
			
		||||
									}
 | 
			
		||||
								})
 | 
			
		||||
							} else {
 | 
			
		||||
| 
						 | 
				
			
			@ -383,9 +382,7 @@ Client.on("interactionCreate", async (interaction) => {
 | 
			
		|||
											}
 | 
			
		||||
										]
 | 
			
		||||
									}
 | 
			
		||||
									console.log(row)
 | 
			
		||||
									console.log(`<t:${Math.floor(new Date(row.timestamp) / 1000)}:R>`)
 | 
			
		||||
									interaction.editReply({ embeds: [embed] })
 | 
			
		||||
									interaction.editReply({ embeds: [embed], ephemeral: true})
 | 
			
		||||
								} else {
 | 
			
		||||
									embed = {
 | 
			
		||||
										title: "User is not banned",
 | 
			
		||||
| 
						 | 
				
			
			@ -409,7 +406,7 @@ Client.on("interactionCreate", async (interaction) => {
 | 
			
		|||
											}
 | 
			
		||||
										]
 | 
			
		||||
									}
 | 
			
		||||
									interaction.editReply({ embeds: [embed] })
 | 
			
		||||
									interaction.editReply({ embeds: [embed], ephemeral: true})
 | 
			
		||||
								}
 | 
			
		||||
							} else {
 | 
			
		||||
								embed = {
 | 
			
		||||
| 
						 | 
				
			
			@ -429,7 +426,7 @@ Client.on("interactionCreate", async (interaction) => {
 | 
			
		|||
										}
 | 
			
		||||
									]
 | 
			
		||||
								}
 | 
			
		||||
								interaction.editReply({ embeds: [embed] })
 | 
			
		||||
								interaction.editReply({ embeds: [embed], ephemeral: true })
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					})
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue