<commit_before>require( 'dotenv-safe' ).load()
const debug = require( 'debug' )( 'request' )
const dollars = require( './lib/get-money' )
const request = require( 'request' )
const url = 'https://slack.com/api/chat.postMessage'
var data = {
  token: process.env.SLACK_API_TOKEN,
  channel: process.env.SLACK_CHANNEL_ID,
  as_user: true,
  pretty: 0,
}

dollars.balance( function ( message ) {
  data.attachments = JSON.stringify( message )
  request( { url: url, qs: data }, function ( error, response/**, body*/ ) {
    if ( error ) {
      debug( error )
      process.exit( 99 )
    }
    debug( `API status: ${ response.statusCode }` )
    debug( `API response: ${ response.body }` )
    process.exit( 0 )
  } )
} )
<commit_msg>A default message is a safe message<commit_after>require( 'dotenv-safe' ).load()
const debug = require( 'debug' )( 'request' )
const dollars = require( './lib/get-money' )
const request = require( 'request' )
const url = 'https://slack.com/api/chat.postMessage'
var data = {
  token: process.env.SLACK_API_TOKEN,
  channel: process.env.SLACK_CHANNEL_ID,
  text: 'Updates from Ledger :bank: :money_with_wings:',
  as_user: true,
  pretty: 0,
}

dollars.balance( function ( message ) {
  data.attachments = JSON.stringify( message )
  request( { url: url, qs: data }, function ( error, response/**, body*/ ) {
    if ( error ) {
      debug( error )
      process.exit( 99 )
    }
    debug( `API status: ${ response.statusCode }` )
    debug( `API response: ${ response.body }` )
    process.exit( 0 )
  } )
} )

{'fraction_non_alphanumeric': 0.1607258587167855, 'fraction_numerical': 0.005184705119896306, 'mean_word_length': 3.3492957746478873, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2024866', 'n_tokens_mistral': 540, 'n_tokens_neox': 528, 'n_words': 132}