Display new topic button for moderators only

// I was asked how to accomplish this and though it may not be the most effective way it worked for me
// so I am sharing it with you
function bphelp_hide_new_topic_button() {
    if ( ! current_user_can( 'edit_others_topics' ) ) {
?>
        <style type="text/css">
            a#new-topic-button {
                display: none !important;
        }

    </style>
<?php
    }
 }
add_action ('bp_head', 'bphelp_hide_new_topic_button');
?>

#new topic button