appinfo+userinfo: dont say deleted for system accounts

This commit is contained in:
Cynthia Foxwell 2025-08-31 01:00:02 -06:00
parent fddf7621a4
commit 2947f688a1
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk
2 changed files with 6 additions and 2 deletions

View file

@ -282,6 +282,8 @@ appinfo.callback = async function (msg, line) {
try { try {
const bot = await hf.bot.requestHandler.request("GET", APIEndpoints.USER(snowflake), true); const bot = await hf.bot.requestHandler.request("GET", APIEndpoints.USER(snowflake), true);
if (bot) { 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)}`; return `Application has been deleted.\nBot user: ${formatUsername(bot)}`;
} else { } else {
return "ID provided does not point to a valid application."; return "ID provided does not point to a valid application.";

View file

@ -423,10 +423,12 @@ userinfo.callback = async function (msg, line) {
descLines.push(""); 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)"); 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("**System account**");
} }
descLines.push(""); descLines.push("");