Skip to content

Commit

Permalink
Merge pull request #35 from mrepol742/master
Browse files Browse the repository at this point in the history
Initial Commit
  • Loading branch information
mrepol742 committed Jan 20, 2024
2 parents 6d6c91b + 64b3566 commit 934659c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6571,8 +6571,12 @@ async function sendMessageOnly(api, event, message, thread_id, message_id, bn, v

async function sendMMMS(api, message, thread_id, message_id, id, voiceE, no_font, sendMessageOnly) {
getUserProfile(id, async function (user) {
let countTokens = countWords(message) + countVowel(message) + countConsonants(message);
addBalance(user, countTokens);
let splitNewLines = message.split("\n");
splitNewLines.shift();
splitNewLines.pop();
splitNewLines = splitNewLines.join(" ");
let countTokens = countWords(splitNewLines) + countVowel(splitNewLines) + countConsonants(splitNewLines);
addBalance(user, (countTokens / 3));
});
if (voiceE && typeof message === "string" && message.length < 200 && groups.tts.includes(thread_id)) {
const url = GoogleTTS.getAudioUrl(message, voiceOptions);
Expand Down

0 comments on commit 934659c

Please sign in to comment.