/[sudobot]/trunk/src/commands/information/UserLookupCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/information/UserLookupCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 289 by rakin, Mon Jul 29 17:29:23 2024 UTC revision 290 by rakin, Mon Jul 29 17:29:23 2024 UTC
# Line 9  import { emoji } from "../../utils/Emoji Line 9  import { emoji } from "../../utils/Emoji
9  import getUser from "../../utils/getUser";  import getUser from "../../utils/getUser";
10  import { parseUser } from "../../utils/parseInput";  import { parseUser } from "../../utils/parseInput";
11  import BaseCommand from "../../utils/structures/BaseCommand";  import BaseCommand from "../../utils/structures/BaseCommand";
12    import { getUserBadges } from "./ProfileCommand";
13    
14  export default class UserLookupCommand extends BaseCommand {  export default class UserLookupCommand extends BaseCommand {
15      supportsInteractions: boolean = true;      supportsInteractions: boolean = true;
# Line 80  export default class UserLookupCommand e Line 81  export default class UserLookupCommand e
81              }              }
82          ];          ];
83    
84            embed.setThumbnail(user.displayAvatarURL());
85    
86          if (member) {          if (member) {
87              fields.push({              fields.push({
88                  name: "Joined Server",                  name: "Joined Server",
# Line 150  export default class UserLookupCommand e Line 153  export default class UserLookupCommand e
153              }              }
154          }          }
155    
156            const badges = getUserBadges(user).join('\n');
157    
158            fields.push({
159                name: "Badges",
160                value: badges.trim() === '' ? '*No badges found*' : badges
161            });
162    
163          fields = [...fields, ...fieldsCommon];          fields = [...fields, ...fieldsCommon];
164          embed.setFields(fields);          embed.setFields(fields);
165          embed.setTimestamp();          embed.setTimestamp();

Legend:
Removed from v.289  
changed lines
  Added in v.290

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26