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 {
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.";

View file

@ -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("");