@ -400,15 +400,15 @@ async function addRole(message) {
const filter = ( reaction , user ) => {
const filter = ( reaction , user ) => {
return [ 'anim_check' , 'anim_cross' ] . includes ( reaction . emoji . name ) && message . guild . members . cache . get ( user . id ) . hasPermission ( 'ADMINISTRATOR' ) && ! user . bot ;
return [ 'anim_check' , 'anim_cross' ] . includes ( reaction . emoji . name ) && message . guild . members . cache . get ( user . id ) . hasPermission ( 'ADMINISTRATOR' ) && ! user . bot ;
} ;
} ;
verificationEmbed . awaitReactions ( filter , { max : 1 , time : 600000000 , errors : [ 'time' ] } )
verificationEmbed . awaitReactions ( filter , { max : 1 } )
. then ( userReaction => {
. then ( userReaction => {
const reaction = userReaction . first ( ) ;
const reaction = userReaction . first ( ) ;
if ( reaction . emoji . name === 'anim_check' ) {
if ( reaction . emoji . name === 'anim_check' ) {
member . roles . add ( role ) . then ( message . reply ( ` ${ member . user } has been given the ** ${ role } ** role! ` ) ) . catch ( ( ) => { message . reply ( "It seems I don't have permissions to give that role, as it's likely above me :(" ) } ) ;
member . roles . add ( role ) . then ( message . reply ( ` ${ member . user } has been given the ** ${ role } ** role! ` ) ) . catch ( ( ) => { message . reply ( "It seems I don't have permissions to give that role, as it's likely above me :(" ) } ) ;
} else {
} else {
message . reply ( "I guess you won't be gett ing that role!" ) ;
message . reply ( "I guess you won't be giv ing that role!" ) ;
}
}
} ) . catch ( verificationEmbed => { verificationEmbed . edit ( "TIMEOUT" ) } ) ;
} ) . catch ( console . error ) ;
} ) . catch ( console . error ) ;
} ) . catch ( console . error ) ;
}
}
@ -453,7 +453,7 @@ async function ban(message) {
const filter = ( reaction , user ) => {
const filter = ( reaction , user ) => {
return [ 'anim_check' , 'anim_cross' ] . includes ( reaction . emoji . name ) && message . guild . members . cache . get ( user . id ) . hasPermission ( 'ADMINISTRATOR' ) && ! user . bot ;
return [ 'anim_check' , 'anim_cross' ] . includes ( reaction . emoji . name ) && message . guild . members . cache . get ( user . id ) . hasPermission ( 'ADMINISTRATOR' ) && ! user . bot ;
} ;
} ;
verificationEmbed . awaitReactions ( filter , { max : 1 , time : 60000 , errors : [ 'time' ] } )
verificationEmbed . awaitReactions ( filter , { max : 1 } )
. then ( userReaction => {
. then ( userReaction => {
const reaction = userReaction . first ( ) ;
const reaction = userReaction . first ( ) ;
if ( reaction . emoji . name === 'anim_check' ) {
if ( reaction . emoji . name === 'anim_check' ) {
@ -461,7 +461,7 @@ async function ban(message) {
} else {
} else {
message . reply ( ` phew! ${ member } 's safe! ` ) ;
message . reply ( ` phew! ${ member } 's safe! ` ) ;
}
}
} ) . catch ( verificationEmbed => { verificationEmbed . edit ( "TIMEOUT" ) } ) ;
} ) . catch ( console . error ) ;
} ) . catch ( console . error ) ;
} ) . catch ( console . error ) ;
}
}
@ -505,7 +505,7 @@ async function kick(message) {
const filter = ( reaction , user ) => {
const filter = ( reaction , user ) => {
return [ 'anim_check' , 'anim_cross' ] . includes ( reaction . emoji . name ) && message . guild . members . cache . get ( user . id ) . hasPermission ( 'ADMINISTRATOR' ) && ! user . bot ;
return [ 'anim_check' , 'anim_cross' ] . includes ( reaction . emoji . name ) && message . guild . members . cache . get ( user . id ) . hasPermission ( 'ADMINISTRATOR' ) && ! user . bot ;
} ;
} ;
verificationEmbed . awaitReactions ( filter , { max : 1 , time : 60000 , errors : [ 'time' ] } )
verificationEmbed . awaitReactions ( filter , { max : 1 } )
. then ( userReaction => {
. then ( userReaction => {
const reaction = userReaction . first ( ) ;
const reaction = userReaction . first ( ) ;
if ( reaction . emoji . name === 'anim_check' ) {
if ( reaction . emoji . name === 'anim_check' ) {
@ -513,7 +513,7 @@ async function kick(message) {
} else {
} else {
message . reply ( ` phew! ${ member } 's safe! ` ) ;
message . reply ( ` phew! ${ member } 's safe! ` ) ;
}
}
} ) . catch ( verificationEmbed => { verificationEmbed . edit ( "TIMEOUT" ) } ) ;
} ) . catch ( console . error ) ;
} ) . catch ( console . error ) ;
} ) . catch ( console . error ) ;
}
}
@ -618,7 +618,7 @@ async function roleRequest(message) {
const filter = ( reaction , user ) => {
const filter = ( reaction , user ) => {
return [ 'anim_check' , 'anim_cross' ] . includes ( reaction . emoji . name ) && message . guild . members . cache . get ( user . id ) . hasPermission ( 'ADMINISTRATOR' ) && ! user . bot ;
return [ 'anim_check' , 'anim_cross' ] . includes ( reaction . emoji . name ) && message . guild . members . cache . get ( user . id ) . hasPermission ( 'ADMINISTRATOR' ) && ! user . bot ;
} ;
} ;
verificationEmbed . awaitReactions ( filter , { max : 1 , time : 600000000 , errors : [ 'time' ] } )
verificationEmbed . awaitReactions ( filter , { max : 1 } )
. then ( userReaction => {
. then ( userReaction => {
const reaction = userReaction . first ( ) ;
const reaction = userReaction . first ( ) ;
if ( reaction . emoji . name === 'anim_check' ) {
if ( reaction . emoji . name === 'anim_check' ) {
@ -626,7 +626,7 @@ async function roleRequest(message) {
} else {
} else {
message . reply ( "I guess you won't be getting that role!" ) ;
message . reply ( "I guess you won't be getting that role!" ) ;
}
}
} ) . catch ( verificationEmbed => { verificationEmbed . edit ( "TIMEOUT" ) } ) ;
} ) . catch ( console . error ) ;
} ) . catch ( console . error ) ;
} ) . catch ( console . error ) ;
}
}