DineshValor / valor

Valor script for WhatsApp Bot based on Baileys Multi Device
https://dineshvalor.github.io/valor
GNU General Public License v3.0
24 stars 44 forks source link

Add a gif to the menu #4

Closed annklin closed 2 years ago

annklin commented 2 years ago

I would like you to add a boy option in gif format, I really loved your bot I wanted it to have this because I have several projects, if you could help me with that I would be very grateful!

DineshValor commented 2 years ago

I would like you to add a boy option in gif format, I really loved your bot I wanted it to have this because I have several projects, if you could help me with that I would be very grateful!

Boy option? What is that?

annklin commented 2 years ago

Sorry, I'm using the translator so it might be a bit wrong translation.

What I mean is is there any way to add a gif to the menu instead of being a location message.

DineshValor commented 2 years ago

Sorry, I'm using the translator so it might be a bit wrong translation.

What I mean is is there any way to add a gif to the menu instead of being a location message.

You can use gif format in menu instead of location image, but don't think so baileys support gif output so maybe gif looks like image.

DineshValor commented 2 years ago

More you can try gif format as own by make changes in menu.js file. (Line 130 to 139) https://github.com/DineshValor/valor/blob/b1389618ce1fdaaf66f6c3fae527a0c7175a40b3/plugins/menu.js#L130

Copy below codes and replace line 130-139 in menu.js.

const valor = 'sample.gif'
    conn.sendButton(m.chat,
`*–––––––『 MENU 』–––––––*

${wish()}, ${name}

*⇓ ᴀʟʟ ᴄᴏᴍᴍᴀɴᴅs ʟɪsᴛᴇᴅ ʙᴇʟᴏᴡ ⇓*`, text.trim(), valor, [
      [`ʙᴏᴛ ɪɴғᴏ`, `${usedPrefix}botinfo`],
      [`ᴩʀᴏғɪʟᴇ`, `${usedPrefix}profile`]
    ], m)

Note: replace sample.gif with gif path or link.

annklin commented 2 years ago

I tried to do this, but when I put it, it doesn't return the gif, but an image.

DineshValor commented 2 years ago

I tried to do this, but when I put it, it doesn't return the gif, but an image.

As i already told that in https://github.com/DineshValor/valor/issues/4#issuecomment-1099607681