I am trying to make a WhatsApp bot inspired by the functioning of Discord bots, the bot will work in WhatsApp groups.
I have looked up the official WhatsApp Business API but I am not sure that they will not approve my number as it is just a hobby project and not a proper "business".
There is an alternative though and that is the Twilio WhatsApp API. However, they provide you with a sandbox. I can interact with it in DMs but as the sandbox number is a business account, I cannot add it to a group like discord.
I intend to write a server in python or node.
Can anyone share a solution or workaround? Only if I could add the Twilio number to a group my problem will be solved. Though I am ready to use any other API/Solutions for this.
There is actually a Python solution for this. It is a pain to set it up, but it still works. Check it out:
https://github.com/mukulhase/WebWhatsapp-Wrapper
It uses the webdriver Selenium to send/retrieve messages through Web-WhatsApp.
Be aware that it is against their rules, so your phone number might get banned!
Related
I'm trying to make it alert me (in console, I am later going to add a discord bot to it) whenever my friend posts to SoundCloud, I would preferably like to get the song link and information about it but I cant do that without getting the basics done.
I've looked through SoundCloud API documentation, and the closest to this is to list the songs.
I don't know where to start.
I'm not a developper but personnaly I would create a database with the actual song of a profile, then check if a new one appeared every x time.
Have you checked really easy solution like Zapier or IFTTT ? They may offer that kind of service. And they can directly make a webhook to a discord bot.
Like we have slash commands in slack, which helps us to perform get or post
similar to do that do we have anything in Microsoft team and if yes are there any documentations.
I have built some slash commands using pythong in slack but i am not finding anything for teams.
In essence, Teams doesn't provide a 100% direct match to "/slash" commands, but there are equivalents, and they pretty much all involve the use of a Bot. In practice, it really just means going from "/" to "#", as you #mention the bot to invoke it, and it can proceed as needed from there.
That said, there are a few places where you might want to surface this. For instance, the "normal" place is in a chat inside a channel. To make this work, you -can- get away without a Bot, but a Bot is the easiest. If you want to do something outside a channel, like just invoking the bot directly, there are two options - interact with the bot in a 1-1 style (in which case the bot appears in the "chat" left menu, as if it were another user). In this case, incidentally, you don't "#mention" the bot because it's the only other person in the chat. The other option is the command text block right at the top of the screen in Teams. In this case, you can have the bot open UI to send it parameters in a guided form, even.
So, in short, there are similar options to "slash" commands in Teams, but for the most part they involve Bots, so you should look into that more. In particular, look at the Teams development docs for Bots, Message Extensions, and Task Modules.
I suggest you also have a look at Create a bot with the Bot Framework SDK for Python.
You could Add custom bots to Microsoft Teams with outgoing webhooks. A webhook is essentially a POST request sent to a callback URL.
Hi everyone so I’m new to developing bots for Telegram with Python and I need help being able to generate the basic get updates information. I usually can when I use the web browser, you know when you drop the telegram link with the bot token key and finish it up with the GetUpdate function in the address bar then the browser just generates a page with all the info such as chat_id, user_id, firstname,last name, etc. Yeah I want to know how to do that with Python so I can achieve the same results in the python terminal. I’m working with the telegram bot for python package so I think it’s called telegram.ext. I’m using the basic guide which involves me using the Dispatcher and Updater, I’m still learning from the guide but for now I need to know how to get that system/session info using my bot in the python terminal. Feel free to ask any questions to clarify this question, thanks.
So far I the most I can do is print out messages I’ve sent to the bot but that’s about it, it’s pretty much filtered and I don’t want that I want the raw and unorganized information like browser usually provides.
The easiest way is to use requests library:
import requests
r = requests.get('https://api.telegram.org/bot<BOT_TOKEN>/getupdates')
print(r.json())
Slack API provides you two options: use app as a bot and as a logged in user itself. I want to create App that will be working as a user and run channel commands. How can I do with discord.py?
Discord.py is no longer maintained to work on user accounts, so given the recent updates in the user api, it is no longer the ideal framework which selfbots should be written in.
There are a number of selfbot api libs out there, but the best one that's written in python is this: https://github.com/Merubokkusu/Discord-S.C.U.M
P.S. selfbotting against tos - so be careful (respect rate limits and don't act like a bot)
As Wright has commented, this is against discord's ToS. If you get caught using a selfbot, your account will be banned. However, if you still REALLY want to do this, what you need to do is add/replace bot.run('email', 'password') to the bottom of your bot, or client.run('email', 'password') to the bottom depending on how your bot is programmed.
Lately, I've worked on a chat bot of my own for twitch.tv, connecting using the IRC channel and using a python script as well as logs from HexChat, my IRC client, to build my bot, which currently can give(upon query) the uptime of the channel, and statistics on emotes in the channel.
However, I have seen Moobot and Nightbot, 2 of the most popular chat bots on twitch, and was wondering how I could:
1) Turn this python script into something a streamer can authorize to be on their channel,
2) Hook up a GUI to this, or a series of text fields for the user to input their settings for the bot while it runs on their channel.
I have looked at previous questions on StackOverflow, looked on Google, and asked in the #twitch-api IRC channel on freenode, however none of these provided the answer, and the only bots I have seen that have this channel-bot integration and authorization are Moobot and Nightbot. Upon clicking "connect to twitch" on moobot's homepage, I can authorize it to use my account much like an oauth request, however I do not know how to set this up. I hope this will help others like me wanting to add some extra usability to their WIP Twitch Chat bot. Thanks!
Moobot: http://twitch.moobot.tv/
Nightbot: https://www.nightbot.tv/
Most of the "big" server-hosted bots consist of 4 major parts:
A database (SQL or NoSQL) holding all the settings etc.
A REST (or similar) API that is used to communicate between the individual parts
A web application for the frontend
A standalone bot for the backend
Keep in mind that this is alot of work to set up. I am currently working on a full rewrite of my bot, which I would share if it wasnt in a pre-alpha state.
Keep in mind that setting up these individual parts might require an experienced web developer. Here is some tips however:
Using python, Django is a great decision for a web application + API backend
As far as I know, there is no decent IRC library for python supporting IRC v3 so you might have to implement your own. Sample implementation of the message parser
Apart from that, see the Twitch.tv API documentation - this includes the Authentification workflow.
If you are looking for a locally-hosted bot, that's a completely different thing to deal with. There is a fair amount of those, some of which are open source too. I dont know any low-level ones, but maybe looking at Botnak, made by a friend of mine, answers some questions.