WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.1k stars 1.07k forks source link

[BUG] conn.updateProfilePicture not working anymore #694

Open AKAZAMD opened 3 months ago

AKAZAMD commented 3 months ago

I want to change the profile with the code below case "setbotphoto": { let bot = conn.user.jid // Bot let q = m.quoted ? m.quoted : m let img = await q.download() if (!img) return reply('Fotonya Gak Ada Kak ┰ω┰') await conn.updateProfilePicture(bot, img) conn.sendText(m.chat, 'Selesai Mengganti Profil Bot Kak>ω<!', m) } break but I never got a response Error: Timed Out at /storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:137:32 { data: { stack: 'Error\n' + ' at promiseTimeout (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:132:19)\n' + ' at waitForMessage (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:114:53)\n' + ' at query (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:136:22)\n' + ' at Object.updateProfilePicture (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Socket/chats.js:176:15)\n' + ' at async conn (/storage/emulated/0/al botz md/alan.js:953:9)' }, isBoom: true, isServer: false, output: { statusCode: 408, payload: { statusCode: 408, error: 'Request Time-out', message: 'Timed Out' }, headers: {} } } and after the error I tried directly with the bot number but it was the same

mrfzvx12 commented 2 months ago

I want to change the profile with the code below case "setbotphoto": { let bot = conn.user.jid // Bot let q = m.quoted ? m.quoted : m let img = await q.download() if (!img) return reply('Fotonya Gak Ada Kak ┰ω┰') await conn.updateProfilePicture(bot, img) conn.sendText(m.chat, 'Selesai Mengganti Profil Bot Kak>ω<!', m) } break but I never got a response Error: Timed Out at /storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:137:32 { data: { stack: 'Error\n' + ' at promiseTimeout (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:132:19)\n' + ' at waitForMessage (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:114:53)\n' + ' at query (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:136:22)\n' + ' at Object.updateProfilePicture (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Socket/chats.js:176:15)\n' + ' at async conn (/storage/emulated/0/al botz md/alan.js:953:9)' }, isBoom: true, isServer: false, output: { statusCode: 408, payload: { statusCode: 408, error: 'Request Time-out', message: 'Timed Out' }, headers: {} } } and after the error I tried directly with the bot number but it was the same

you should use conn.user.id

AKAZAMD commented 1 month ago

Saya ingin mengubah profil dengan kode di bawah case "setbotphoto": { let bot = conn.user.jid // Bot let q = m.quoted ? m.quoted : m let img = menunggu q.download() if (!img) return reply('Fotonya Gak Ada Kak ┰ω┰ ') menunggu conn.updateProfilePicture(bot, img) conn.sendText(m.chat, ' Selesai Mengganti Profil Bot Kak>ω<!', m) } break tapi saya tidak pernah mendapat respon Error: Timed Out at /storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Utils/ generics.js:137:32 { data: { tumpukan: 'Kesalahan\n' + ' di janjiTimeout (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:132 :19)\n' + ' di waitForMessage (/storage/emulated/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:114:53)\n' + ' di kueri (/ penyimpanan/emulasi/0/al botz md/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:136:22)\n' + ' di Object.updateProfilePicture (/storage/emulated/0/al botz md/ node_modules/@whiskeysockets/baileys/lib/Socket/chats.js:176:15)\n' + ' di async conn (/storage/emulated/0/al botz md/alan.js:953:9)' }, isBoom: true, isServer: false, output: { statusCode: 408, payload: { statusCode: 408, error: 'Request Time-out', message: 'Timed Out' }, headers: {} } } dan setelah kesalahan I dicoba langsung dengan nomor botnya tapi tetap sama

anda harus menggunakan conn.user.id

actually I have found another way with a query but now for some reason jimp error to crop the photo