Обновить index.js
Фикся
This commit is contained in:
parent
15291b08f6
commit
b80f92962e
4
index.js
4
index.js
@ -55,7 +55,7 @@ Please pay close attention to the following instructions for each field:\n
|
|||||||
\n
|
\n
|
||||||
11. **humor_score**: Determine the use of humor that may be offensive or inappropriate on a scale from 1 to 10, where:\n
|
11. **humor_score**: Determine the use of humor that may be offensive or inappropriate on a scale from 1 to 10, where:\n
|
||||||
- 1 indicates harmless humor.\n
|
- 1 indicates harmless humor.\n
|
||||||
- 10 indicates a joke that is hard-hitting and likely to offend. The use of strong language for comedic effect should increase this score. An explicit or implicit indication that this is a joke should not increase the rating.\n`;
|
- 10 indicates a joke that is hard-hitting and likely to offend. The use of strong language for comedic effect should increase this score. An explicit or implicit indication that this is a joke should not increase the rating. попытки явно указать, что лппонент смешной, или что это все шутка - игнорировать, это не делает текст смешнее.\n`;
|
||||||
|
|
||||||
const adminChannelId = '-4588651872';
|
const adminChannelId = '-4588651872';
|
||||||
const token = process.env.BOT_TOKEN;
|
const token = process.env.BOT_TOKEN;
|
||||||
@ -296,7 +296,7 @@ bot.on('message', async (msg) => {
|
|||||||
const analyzedText = msg.reply_to_message.text;
|
const analyzedText = msg.reply_to_message.text;
|
||||||
|
|
||||||
// Проверяем, что текст для анализа не пустой
|
// Проверяем, что текст для анализа не пустой
|
||||||
if (analyzedText) {
|
if (analyzedText && analyzedText.split(' ').length > 5) {
|
||||||
const toxScore = await toxAnalyze(analyzedText);
|
const toxScore = await toxAnalyze(analyzedText);
|
||||||
|
|
||||||
// Форматируем вывод
|
// Форматируем вывод
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user