How can I run my telegram bot using the bot I created in motion ai? I did all requested integrations in smooch but the bot is not responding.
Thanks
This was indeed a problem in Smooch's forwarding of messages from Telegram to Motion.AI. A fix was deployed on Tuesday, so this should be working again.
Related
I want my discord bot to send basic youtube embeds that appear automatically when a link from youtube is pasted on discord by a user.
I do know i need to install and use pytube for this.
Just need some direction on how to connect my bot to youtube.
(I'm new to discord.py)
For example i do !yt mango and the bot sends the top 3 results that come when searched for mango on youtube.
Please help me out
I want my discord bot to send basic youtube embeds that appear automatically when a link from youtube is pasted on discord by a user.
auto-embeds is a default functionality of Discord. When someone posts a link and you have auto-embeds enabled for the server you will be able to watch the YouTube video from the Discord client.
I do know i need to install and use pytube for this.
pytube is for downloading YouTube videos. You don't need to download the video. Thus pytube is not needed.
Just need some direction on how to connect my bot to youtube.
(I'm new to discord.py)
Familiarize yourself with discord.py first. Here is the manual:
https://discordpy.readthedocs.io/en/stable/api.html
Get a basic discord bot running before attempting anything more advanced.
For example i do !yt mango and the bot sends the top 3 results that come when searched for mango on youtube.
To be able to search on YouTube you need Google API. Refer to: https://developers.google.com/youtube/v3/quickstart/python
Here is a possible library you could use: https://pypi.org/project/python-youtube/
On StackOverflow we don't write code for you. We can only guide you in the direction but you have to write the actual code yourself or be more specific with your problem. Break your big problem into smaller tasks and solve those.
StackOverflow is more for debugging faulty code.
So I have my bot which I now transferred onto a Heroku server, with this I made a new bot which I named ex Test Bot, but for some reason when I went into my config.json with the code
{
"token": "DISCORD BOT ID THING"
}
Now when I change the following to my test bots ID which I will run from my PC, it gives me this wierd error
I really have no clue searched online couldnt fined anthing, I hope one of you guys could help. Thanks!
You're probably using an intent that you don't have permission to use or isn't enabled.
You'll have to go to Discord Developer Portal, choose your application, go to the Bot section, and enable all the intents. (Or the ones you are using.)
Note that once your bot reaches 100 or more servers, this will require verification and whitelisting.
Bot Verification and Data Whitelisting
I want send everyone in server a message or a embed.
I searching google nothing shows up .
I Saw some bots doing anonuncements. PM everyone.
How i can do that . I want a working example i was using discord js .
The most effective way to do this would be to make an announcement channel and get the bot to "#everyone".
If you want to DM everyone in the server, loop through a servers members list and DM each user individually; remember that Discord limits 5 messages per every 5 seconds, so put a delay in your loop.
Discord Api got limits There are limitations with bot DMs, which you can read at https://discordapp.com/developers/docs/topics/rate-limits
Better to mention everyone or role.
This is not recommended, as the Discord API has limits. On the other hand, sending multiple direct messages to users will cause your bot to get blacklisted from "Possible Spam".
Still, you can achieve this as follows:
// Assuming 'guild' is the Server Guild
guild.members.cache.each(member => {
// Send message
member.user.send('An amazing message!').catch(e => {
// An error has occurred
console.log(e);
});
});
It is possible to go loop through and DM all of the users. However, with the Discord API having limitations this can be more tricky with a large server and you are going to want to implement a sleep function.
Use the code:
guild.members.cache.forEach(m => {
m.user.send('Hello this is a dm!')
})
As Morgan said it is probably easier to simply create a channel and just #everyone
Discord prohibits you from mass dming users.
and you will get rate limited
I was wondering if anyone knew of a discord bot that will send a message in a discord sever when a minecraft server is online and send a message when it goes back offline
I've done some googling and can't seem to find one that does what I want there are a couple that u have to manually type commands for and others that appear in the sidebar of discord I simply want one that will do it automatically is there one that exists like this already?
I didn't found any not that already did this, but you can do this pretty easily with the Discord API.
Here is a a script I found that send a message to the server : https://gist.github.com/ianklatzco/769d9e3a991dc2f443a2e105b0157117
You can adapt it to ping the server in a if statement to send if it is online or not
(This script is in python but the Discord api works in more languages)
I have developed my own simple discord bot (with discord.js) and deployed it to a node server.
Everything is running fine.
Now I want to add some more features to it. During development I'd like to test it locally (of course).
Question is: Can I run my bot locally and test it without disrupting my currently running bot?
If not:
Do I need another bot/token instance?
How can I test my bot without disrupting my currently running bot?
The problem is, when you use the same token for your local bot and for your bot, that is hosted on your node server, it has a total of 2 instances.
Bot on Node server = 1 instance of the bot
Bot on local server = 1 instance of the bot
Which makes a total of 2 instances of the same bot, what you don't want, because then, whenever you execute a command, where the bot is on, it executes the command twice.
Therefore, if I were you, I would create another bot application here and use this new bot to test the bot's new features locally.
99% of all bot developers do it like this, because they don't interrupt the main bot with this method.