mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-17 10:53:57 +01:00
feat: backgrounds
This commit is contained in:
1 parent
437bee4a85
commit
0209d48475
5 files changed
+83
No files matched your search
@@ -17,4 +17,7 @@ export abstract class AbstractAPI {
|
||||
|
||||
abstract avatars(): Promise<CatalogItemAccessor[]>;
|
||||
abstract avatar(id: string): Promise<CatalogItemAccessor>;
|
||||
|
||||
abstract backgrounds(): Promise<CatalogItemAccessor[]>;
|
||||
abstract background(id: string): Promise<CatalogItemAccessor>;
|
||||
}
|
||||
@@ -154,4 +154,12 @@ export class ServerAPI extends AbstractAPI {
|
||||
async avatar(id: string) {
|
||||
return this.metadata.item(`ProfileAvatarEntity.${id}`);
|
||||
}
|
||||
|
||||
async backgrounds() {
|
||||
return this.metadata.group("ProfileBackgroundEntity");
|
||||
}
|
||||
|
||||
async background(id: string) {
|
||||
return this.metadata.item(`ProfileBackgroundEntity.${id}`);
|
||||
}
|
||||
}
|
||||
@@ -17,10 +17,17 @@ export const tools: Record<string, Tool> = {
|
||||
button: "purple",
|
||||
significant: true,
|
||||
},
|
||||
|
||||
avatars: {
|
||||
id: "avatars",
|
||||
button: "gold",
|
||||
},
|
||||
|
||||
backgrounds: {
|
||||
id: "backgrounds",
|
||||
button: "amber",
|
||||
},
|
||||
|
||||
api: {
|
||||
id: "api",
|
||||
disabled: true,
|
||||
|
||||
Reference in new issue
Block a user