aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-27 17:55:49 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-27 17:55:49 -0400
commitb72d58843e853b0f260527a3689f76b13946bcb8 (patch)
tree3be22bc6eb5365f59e0c4d84944172af1eddf379 /src/commands/info
parenta297485a0a0e54bf5942642b633dc31be934da0f (diff)
downloadtanzanite-b72d58843e853b0f260527a3689f76b13946bcb8.tar.gz
tanzanite-b72d58843e853b0f260527a3689f76b13946bcb8.tar.bz2
tanzanite-b72d58843e853b0f260527a3689f76b13946bcb8.zip
add bot -> application mapping for user command
Diffstat (limited to 'src/commands/info')
-rw-r--r--src/commands/info/userInfo.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 045087f..1f139b5 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -1,5 +1,6 @@
import {
Arg,
+ bots,
BushCommand,
clientSendAndPermCheck,
colors,
@@ -258,8 +259,11 @@ export default class UserInfoCommand extends BushCommand {
public static async generateBotField(embed: EmbedBuilder, user: User, title = 'ยป Bot Information') {
if (!user.bot) return;
+ // very old bots have different bot vs user ids
+ const applicationId = bots[user.id]?.applicationId ?? user.id;
+
const applicationInfo = (await user.client.rest
- .get(`/applications/${user.id}/rpc`)
+ .get(`/applications/${applicationId}/rpc`)
.catch(() => null)) as APIApplication | null;
if (!applicationInfo) return;