Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement bot invoking capabilities #3009

Open
wants to merge 3 commits into
base: webpack-exodus
Choose a base branch
from

Conversation

MatMercer
Copy link

@MatMercer MatMercer commented May 4, 2024

PR Details

Allows Meta AI and bot mentions to work with +1 numbers.

Description

This patch allows to call WhatsApp bots by mentioning them.

You can find all bot wid's by using my pastebin: https://pastebin.com/raw/z9AidmRF

Or by running this at whatsapp web console:

bots = ''
window.require("WAWebBotProfileCollection").BotProfileCollection._models.forEach(b => bots += b.__x_name + ` - ` +  b.__x_description + ` ` + b.__x_id._serialized + '\n')
console.log(bots)

Motivation and Context

I wanted to create a proxy for people who don't have access to @meta AI bots.
Someone outside from US can use my bot to call the @meta AI.

How Has This Been Tested

npm install --save "git://github.com/MatMercer/whatsapp-web.js.git#bot-invoke-patch"
const botId = '[email protected]';
const text = `@${botId} Hello there!`;
const opt = { mentions: [botId], invokedBotWid: botId };
await chat.sendMessage(text, opt);

image

Types of changes

  • Dependency change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (index.d.ts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant