File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,14 @@ export async function handlePatreonModalSubmit(interaction: ModalSubmitInteracti
9595 return ;
9696 }
9797
98+ const isTier2Supporter = hasRole (
99+ interaction . member as GuildMember ,
100+ config . discord . roles . patreonSupporterT2
101+ ) ;
102+
98103 let groupId : number | undefined ;
99104
100- if ( hasRole ( interaction . member as GuildMember , config . discord . roles . patreonSupporterT2 ) ) {
105+ if ( isTier2Supporter ) {
101106 const groupIdValue = interaction . fields . getTextInputValue ( 'groupId' ) ;
102107 const isInteger = typeof groupIdValue === 'string' && Number . isInteger ( parseInt ( groupIdValue ) ) ;
103108
@@ -123,8 +128,10 @@ export async function handlePatreonModalSubmit(interaction: ModalSubmitInteracti
123128 sendModLog (
124129 interaction . guild ,
125130 `${ interaction . user } has claimed ${
126- groupId ? 'Tier 2' : 'Tier 1'
127- } Patreon benefits for: \nUsername: ${ username } ${ groupId ? `\nGroup id: ${ groupId } ` : '' } `
131+ isTier2Supporter ? 'Tier 2' : 'Tier 1'
132+ } Patreon benefits for: \nUsername: ${ username } ${
133+ isTier2Supporter ? `\nGroup id: ${ groupId ?? '--' } ` : ''
134+ } `
128135 ) ;
129136 } catch ( error ) {
130137 interaction . reply ( { content : error . message , ephemeral : true } ) ;
You can’t perform that action at this time.
0 commit comments