File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ export async function verifyAction(
2626 throw new Error ( "Verification gate is not active." ) ;
2727 }
2828
29- const guildMember = member . guild . members . cache . get ( member . id ) ;
29+ const guildMember = await member . guild . members . fetch ( member . id ) ;
3030
3131
3232 if ( action == VerificationAction . AddRole ) {
3333 for ( const roleId of data . Roles ) {
34- const role = member . guild . roles . cache . get ( roleId ) ;
34+ const role = await member . guild . roles . fetch ( roleId ) ;
3535 if ( role ) {
3636 if ( ! guildMember ?. roles . cache . has ( roleId ) ) {
3737 await guildMember ?. roles . add ( role ) ;
@@ -44,7 +44,7 @@ export async function verifyAction(
4444 if ( action == VerificationAction . AddPermissionToChannel ) {
4545
4646 for ( const permission of data . ChannelPermissions ) {
47- const channel = guildMember ?. guild . channels . cache . get ( permission . ChannelId ) ;
47+ const channel = await guildMember ?. guild . channels . fetch ( permission . ChannelId ) ;
4848 if ( channel ) {
4949 if ( ! channel . isTextBased ( ) ) continue ;
5050
You can’t perform that action at this time.
0 commit comments