appinfo+userinfo: dont say deleted for system accounts
This commit is contained in:
		
							parent
							
								
									fddf7621a4
								
							
						
					
					
						commit
						2947f688a1
					
				
					 2 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -282,6 +282,8 @@ appinfo.callback = async function (msg, line) {
 | 
			
		|||
      try {
 | 
			
		||||
        const bot = await hf.bot.requestHandler.request("GET", APIEndpoints.USER(snowflake), true);
 | 
			
		||||
        if (bot) {
 | 
			
		||||
          const isSystem = bot.system || bot.discriminator === "0000";
 | 
			
		||||
          if (isSystem) return `System users do not have applications.`;
 | 
			
		||||
          return `Application has been deleted.\nBot user: ${formatUsername(bot)}`;
 | 
			
		||||
        } else {
 | 
			
		||||
          return "ID provided does not point to a valid application.";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -423,10 +423,12 @@ userinfo.callback = async function (msg, line) {
 | 
			
		|||
    descLines.push("");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (botDeleted) {
 | 
			
		||||
  const isSystem = user.system || user.discriminator === "0000";
 | 
			
		||||
 | 
			
		||||
  if (botDeleted && !isSystem) {
 | 
			
		||||
    descLines.push("*This bot's application has been deleted*\n-# (or app ID and user ID desync)");
 | 
			
		||||
  }
 | 
			
		||||
  if (user.system) {
 | 
			
		||||
  if (isSystem) {
 | 
			
		||||
    descLines.push("**System account**");
 | 
			
		||||
  }
 | 
			
		||||
  descLines.push("");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue