Боже мой, НЕНАВИЖУ стекопоток! Это чертовски круто в A **, чтобы получить правильное сообщение! Я даже не могу комментировать, потому что у меня нет представителя enuff!
to get url .. go to... server settings > webhooks > create/edit webhook
function send(){
var url = "see above";
var request = new XMLHttpRequest();
request.open("POST", url);
request.setRequestHeader('Content-type', 'application/json');
var myEmbed2 = {
"author": {
"name": "Birdie♫ 3",
"url": "https://www.reddit.com/r/cats/",
"icon_url": "https://i.imgur.com/R66g1Pe.jpg"
},
"title": "FINALLY!!!... bot embeds!",
"url": "https://google.com/",
"description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`",
"color": 15258703,
"fields": [
{
"name": "Admins",
"value": "Day/Acti",
"inline": true
},
{
"name": "Helpers",
"value": "Wombat,Phaedra",
"inline": true
},
{
"name": "Use `\"inline\": true` parameter, if you want to display fields in the same line.",
"value": "okay..."
},
{
"name": "Thanks!",
"value": "You're welcome :wink:"
}
],
"thumbnail": {
"url": "https://upload.wikimedia.org/wikipedia/commons/3/38/4-Nature-Wallpapers-2014-1_ukaavUI.jpg"
},
"image": {
"url": "https://upload.wikimedia.org/wikipedia/commons/5/5a/A_picture_from_China_every_day_108.jpg"
},
"footer": {
"text": "Woah! So cool! :smirk:",
"icon_url": "https://i.imgur.com/fKL31aD.jpg"
}
}
var params = {
username: "Codepen BOT-03",
embeds: [ myEmbed2 ]
}
request.send(JSON.stringify(params));
}// emd send