BochilGaming / games-wabot

Games-wabot is RPG Bot Whatsapp. Now support Multi-device!!, check branch multi-device
http://bochil.ddns.net/
GNU General Public License v3.0
210 stars 509 forks source link

{SOLVED} [REQUEST] (MD) Delete.js & Button Location image in simple.js! #228

Closed DineshValor closed 2 years ago

DineshValor commented 2 years ago

Button Location Image Message code line missing in ./lib/simple.js, or am i missed somewhere?

Image location looks much better, and prevent saving images in gallery.

BochilGaming commented 2 years ago

Button Location Image Message code line missing in ./lib/simple.js, or am i missed somewhere?

Image location looks much better, and prevent saving images in gallery.

conn.sendButton(m.chat, 'hi', global.author, buffer, [['menu', '/menu']], m, { asLocation: true })
DineshValor commented 2 years ago

If anyone want to use Hydrated Buttons Image Location then below is the example to do that:

Sample-

conn.sendHydrated(m.chat, text.trim(), author, 'link.jpg', 'template-url', 'Template-URL', '0123456789', 'Template-CALL', [
      ['Donate', '/donasi'],
      ['Speed', '/ping'],
      ['Owner', '/owner']
    ], m, {asLocation: true})

Example-

conn.sendHydrated(m.chat, 'one', 'two', 'https://telegra.ph/file/fe5883c8011fd033e395c.jpg', 'https://github.com/BochilGaming/Games-wabot', 'Github', '0123456789', 'Call', [
      ['Donate', '/donasi'],
      ['Speed', '/ping'],
      ['Owner', '/owner']
    ], m, {asLocation: true})

Screenshot_20220225-135044

If didn't want any button or template just replace them by null -

For Example-

conn.sendHydrated(m.chat, 'one', 'two', 'https://telegra.ph/file/fe5883c8011fd033e395c.jpg', 'https://github.com/BochilGaming/Games-wabot', 'Github', null, null, [
      ['Speed', '/ping'],
      ['Owner', '/owner']
    ], m, {asLocation: true})

Screenshot_20220225-134848

BochilGaming commented 2 years ago

can you make pull request to add that code to README.md ?

DineshValor commented 2 years ago

can you make pull request to add that code to README.md ?

Yeah, i will try my best to make these code in README.md