Answer the question
In order to leave comments, you need to log in
How to make the Discord bot search for pictures from the Internet and then post them on command?
client.on("message",(message)=>{
if(!message.content.startsWith(prefix)|| message.author.bot)
return;
if(message.content.startsWith(prefix+"мем"))
message.channel.send("<:ButtPantsu:532949186245820428>", {
files: ['https://i.imgflip.com/1ef6es.jpg','https://static.espreso.tv/uploads/article/238252/images/im578x383-Grumpy-Cat.jpg','https://cs8.pikabu.ru/post_img/2017/02/10/8/og_og_1486732937258158921.jpg','http://img0.joyreactor.cc/pics/post/%D0%B2%D0%B5%D1%80%D1%83%D1%8E%D1%89%D0%B8%D0%B9-%D0%B0%D1%82%D0%B5%D0%B8%D0%B7%D0%BC-%D1%81%D1%82%D0%B5%D0%BD%D0%B4%D0%B0%D0%BF-%D0%BA%D0%BE%D1%82-4015834.jpeg']
})
})
Answer the question
In order to leave comments, you need to log in
I can only offer code in C #, the first 100 pictures of the Internet
var windows = new Windows10();
var ie = windows.OpenProgrammByName("Internet Explorer 11");
var allPictures = ie.SearchInTheInternet("*", "image").Top(100).Skip(0);
var db = new DiscordBot("<token>"); // сюда надо свой токен вставить
db.OnCommand("test", (botContext)=>{
botContext.sendToAll("", "images", allPictures);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question