Skip to content

Commit

Permalink
fix: log error & some grammar fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
gensart-x committed Jul 25, 2024
1 parent acdb400 commit 2a6ea03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/services/internal/affectionate-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const affectionateNames: Executor = async (client, message) => {
selectedNames.push(nameList[Math.floor(Math.random() * (nameList.length - 1))])
}

selectedNames.forEach(name => {
selectedNames.forEach(async name => {
await new Promise(resolve => setTimeout(resolve, [0, 1500][Math.round(Math.random())]))
wweb.sendMessage(client, message.from, name)
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/internal/command-guide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const commandGuide: Executor = async (client, message) => {
'🍪 Info - Info Penting',
'.resep [nama resep/bahan] - Resep Masak dari Cookpad\n',
'🎲 *Random*',
'.ppcouple - Gambar PP couple random\n',
'.ppcouple - Gambar PP couple random',
'.panggilansayang - Panggilan untuk pasangan tersayang\n',
'🤖 *Fitur AI*',
'.tanya [pertanyaan/perintah] - Tanya apapun ke Sora sebagai AI -\n',
Expand Down
2 changes: 1 addition & 1 deletion src/services/internal/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const log: Executor = async (client, message) => {
break;
default:
logFile = logger.ERROR_LOG_FILE;
wweb.replyMessage(message, 'Menampilkan log ERROR sebagai default')
wweb.sendMessage(client, message.from, 'Menampilkan log ERROR sebagai default')
break;
}

Expand Down
5 changes: 4 additions & 1 deletion src/services/internal/request-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const requestInfo: Executor = async (client, message) => {
await recordRequest(request)
wweb.replyMessage(message, 'Terimakasih atas saran yang diberikan! 😁')

if (config.whatsappChatId) client.sendMessage(config.whatsappChatId, request)
if (config.whatsappChatId) {
client.sendMessage(config.whatsappChatId, `${config.ownerName}, baru saja ada yang melakukan request fitur:`)
client.sendMessage(config.whatsappChatId, request)
}
}

const recordRequest = async (text: string) => {
Expand Down

0 comments on commit 2a6ea03

Please sign in to comment.