File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 77 ComponentType ,
88 ContainerBuilder ,
99 MessageFlags ,
10+ SectionBuilder ,
1011 SlashCommandBuilder ,
1112 TextDisplayBuilder ,
1213 type User ,
@@ -53,6 +54,8 @@ export default class InventarCommand implements ApplicationCommand {
5354 b . createdAt . localeCompare ( a . createdAt ) ,
5455 ) ;
5556
57+ const circle = await drawBbCircle ( new Set ( contents . map ( i => i . lootKindId ) ) ) ;
58+
5659 let lastPageIndex = Math . floor ( contents . length / pageSize ) ;
5760 lastPageIndex -= contents . length % pageSize === 0 ? 1 : 0 ;
5861
@@ -77,7 +80,8 @@ export default class InventarCommand implements ApplicationCommand {
7780
7881 return {
7982 components : [
80- new ContainerBuilder ( )
83+ new SectionBuilder ( )
84+ . setThumbnailAccessory ( t => t . setURL ( "attachment://circle.png" ) )
8185 . addTextDisplayComponents ( t => t . setContent ( `## Inventar von ${ user } ` ) )
8286 . addTextDisplayComponents (
8387 ...listItems . map ( li => new TextDisplayBuilder ( ) . setContent ( li ) ) ,
@@ -108,6 +112,12 @@ export default class InventarCommand implements ApplicationCommand {
108112 flags : MessageFlags . IsComponentsV2 ,
109113 withResponse : true ,
110114 tts : false ,
115+ files : [
116+ {
117+ attachment : circle ,
118+ name : "circle.png" ,
119+ } ,
120+ ] ,
111121 } ) ;
112122
113123 const message = callbackResponse . resource ?. message ;
You can’t perform that action at this time.
0 commit comments