File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,22 +165,22 @@ async function onBoostStart(member: GuildMember): Promise<void> {
165165 await safeSend ( logChannel , { embeds : [ logEmbed ] } ) ;
166166
167167 try {
168- const guild = await member . guild . fetch ( ) ;
169168 const serverImage = guild . iconURL ( ) ;
170169
171- const container = new ContainerBuilder ( ) . addSectionComponents ( comp =>
172- comp
173- . addTextDisplayComponents ( text =>
174- text . setContent (
175- `## Thanks for the boost! <a:booster:1527782487349268480>\n` +
176- `Thank you for boosting the server **${ guild . name } **\n\n` +
177- `Your support helps us unlock new server perks and continue making this community even better for everyone.\n\n` +
178- `We truly appreciate you being part of our journey. Enjoy your booster rewards! ✨`
179- )
170+ const container = new ContainerBuilder ( ) . addSectionComponents ( comp => {
171+ comp . addTextDisplayComponents ( text =>
172+ text . setContent (
173+ `## Thanks for the boost! <a:booster:1527782487349268480>\n` +
174+ `Thank you for boosting the server **${ guild . name } **\n\n` +
175+ `Your support helps us unlock new server perks and continue making this community even better for everyone.\n\n` +
176+ `We truly appreciate you being part of our journey. Enjoy your booster rewards! ✨`
180177 )
181- . setThumbnailAccessory ( accessory => accessory . setURL ( serverImage ? serverImage : '' ) )
182- )
183- . setAccentColor ( SystemColors . main ) ;
178+ ) ;
179+ if ( serverImage ) {
180+ comp . setThumbnailAccessory ( accessory => accessory . setURL ( serverImage ) ) ;
181+ }
182+ return comp ;
183+ } ) . setAccentColor ( SystemColors . main ) ;
184184 await member . send ( {
185185 components : [ container ] ,
186186 flags : [ MessageFlags . IsComponentsV2 ]
You can’t perform that action at this time.
0 commit comments