File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,21 +9,21 @@ export class WebhookStorage {
99 return webhook ;
1010 }
1111
12+ const avatarUrl = me . avatarURL ( ) ;
13+
1214 const webhooks = await channel . fetchWebhooks ( ) ;
1315 webhook = webhooks . find ( x => x . name === me . username ) ;
1416 if ( webhook ) {
1517 this . webhookMap . set ( channel . id , webhook ) ;
1618
17- const avatarUrl = me . avatarURL ( ) ;
18-
1919 if ( webhook . avatarURL ( ) != avatarUrl ) {
2020 await webhook . edit ( { avatar : avatarUrl ?? undefined } ) ;
2121 }
2222
2323 return webhook ;
2424 }
2525
26- webhook = await channel . createWebhook ( me . username , { avatar : me . avatar ?? undefined } ) ;
26+ webhook = await channel . createWebhook ( me . username , { avatar : avatarUrl ?? undefined } ) ;
2727 this . webhookMap . set ( channel . id , webhook ) ;
2828 return webhook ;
2929 }
You can’t perform that action at this time.
0 commit comments