How do I run python script on BlueStacks android emulator? - python

So there is an app called tandem, and it's on BlueStacks the android emulator, and I need to send automated messages to people I have followed on that app, without me having to scroll through everyone and sending them messages one by one, is there a way for me?
This app is not available on the web, so I have to use bluestacks.
Someone successfully made a spam bot using Python here, but that was for whatsapp.
Here's what I meant by having followed a list of users.
Also, I want to know how I can make it so that, if there is a specific sentence written, that the bot would spam another message instead. Let's say I write ”hello, how are you?” and the bot goes through other messages with the exact same messages, and spam another automated message, like ” I am doing great thanks”?

Related

Trying to code a Discord selfbot to send message from multiple accounts controlled by one master account

Hey so ive been trying to make a selfbot and hopefully slowly learn python along the way. I ve gotten far enough to do it in one account but i want to do it from multiple accounts controlled by a master account with commands and command prefixes. This video shows what i am trying to replicate, just i want to do it in server as well and not necessarily spam that much just one set of message from each account is good enough. https://www.youtube.com/watch?v=1N6cR-FIJgE This is the video. How do i convert the code to use multiple tokens and control those accounts with a master account. https://github.com/casrfgd2/discod - this is the code
Self bots are against Discord's Terms of service and can get your account or in this case multiple accounts banned
What you could do is make a discord bot and use it to the mass dm (which is also kind of against the terms) with just one discord account
To use multiple bots with the same code you could fork the repository per bot and put the different token in your env file every fork

How to communicate to an always running python script

i'm developing a python telegram bot and i have a script that is always running (for receiving new command from telegram) and i want the bot to send messages when the user perform a action in a website.
example: the user start the bot, the bot send a link to perform an action in the website (like login to the user's account and connect the telegram id with the user id) and then send a confirmation message on telegram that all's good.
my problem is how i can tell the python script that the action in the browser is done? for now i'm constantly query a database but my solution is pretty dumb because if the user don't perform any action the query can go forever.
any suggestion how to do it correctly?
thx <3
I see two viable solutions here:
Send the message directly from the website. While only one process is allowed to fetch updates at a time, you can make other requests from as many servers as you like. Depending on how your website works, you can make a plain HTTP request to the Bot API or use an API wrapper like python-telegram-bot or a wrapper in a different language to make the request. e.g. if you're running a php-based website, you could use a php API wrapper.
If for some reason 1. is not an option for you, you can try to inform your running process about the user login. the PTB FAQ have an entry that should help you get started. If your website & bot are running on the same server, it might be possible to make the update_queue directly available to the website process. If not, you can try to set up a webhook for your bot and post an update to the webhook that you then enqueue into the update_queue
Approach 1. has the downside that you don't have all the bot logic in one place, but it should be by far easier to implement than 2.
Disclaimer: I'm currently the maintainer of python-telegram-bot

Program to respond to Whatsapp messages

I need a program that detects a whatsapp message, and depending on what the message says it replies with a something different. Does anyone have any idea or code that will help me go about making this program with python?
There are many options available in order to build a WhatsApp bot using Python, however take a look at this tutorial, which is simple and gets you up and running.

django-telegrambot doesn't catch all forwarded messages using WEBHOOK mode

I use django-telegrambot package to make anti-spam telegram bot. The mode for the bot is WEBHOOK
I have some functionality to remove all forwarded messages from chat.
My code looks like:
if update.message.forward_from or update.message.forward_from_chat:
bot.delete_message(chat_id=update.message.chat_id, message_id=update.message.message_id)
return
the code above doesn't work very well, for example when I select a few messages and send them to channel, it deletes only one(sometimes two) messages from forwarded set, sometimes it even doesn't delete if I forward one message, I checked if we always have forward_from and forward_from_chat when forwarding, yes -- we always have it, also I thought I just have some amount of pending_update_count, but it's 0
I know django-telegrambot based on python-telegram-bot package when I have the same code using only python-telegram-bot and run it locally like python main.py it works perfect(catch and delete all forwarded messages)
Did someone face with such error here?
Any thinks/suggestions?
Thanks!
So ok, after investigating I didn't find where is the trouble here, but when I changed the mode from WEBHOOKto POLLING -- it works perfectly without any errors

Adding something to Twitch bot

So I have looked up some vids and made one of those simple twitch bots that can handle triggers.
Now I made a trigger when a normal bot says "Welcome to the...." that it sends a message. I would like to add the names etc, and was wondering if this is possible.
Or is it possible to read the Twitch notification instead of the bot trigger (so the message without user name like '| name just subscribed wit ha $4.99 sub!')
You might want to consider reading this reddit post before continuing your development.
However, this three part video series is a great reference tutorial which will give you good foundations on how to make a simple python based twitch bot.

Categories