V4NSH4J / discord-mass-DM-GO

The most powerful Discord selfbot written in GO allowing users to automate their campaigns & send low-cost mass messages to Discord users!
https://t.me/tosviolators
GNU Affero General Public License v3.0
2.17k stars 638 forks source link

Message not loading [Error while setting messages: json: cannot unmarshal object into Go value of type []instance.Message] #587

Closed Descatres closed 2 years ago

Descatres commented 2 years ago

I was trying to message me this, just to have fun:

{
    "embed": {
        "title": "Hello!! 👋",
        "description": "We are name !\n",
        "color": 16065893,
        "url": "https://discord.gg/bsJGQHf6",
        "author": {
            "name": "Name",
            "url": "https://discord.com/",
            "icon_url": "https://unsplash.it/100"
        },
        "thumbnail": {
            "url": "https://unsplash.it/200"
        },
        "image": {
            "url": "https://unsplash.it/380/200"
        },
        "footer": {
            "text": "Name",
            "icon_url": "https://unsplash.it/100"
        },
        "fields": [
            {
                "name": "Visit our website for more information about the project!",
                "value": "[website.com](https://website.com/)"
            },
            {
                "name": "Check our socials!",
                "value": "[Twitter](https://twitter.com) and [Instagram](https://www.instagram.com)!",
                "inline": true
            },
            {
                "name": "Join our Discord!",
                "value": "> [Take me there!](https://discord.gg)",
                "inline": false
            }
        ]
    }
}

image (the preview on the side seems nice and no errors appeared on the website)

But I seem to be failing somewhere...

image

Any idea what can it be?

Descatres commented 2 years ago

got part of my response from !575 I had to create a link.

EDIT: it did not solve the problem entirely. Now I get this error while creating the embed: image

I'm using the website that is recommended in the readme but I can't figure out what's wrong. This is the code that I'm using for the embed:

{
        "title": "Hello!! 👋",
        "description": "We are Name!\n",
        "color": 16065893,
        "url": "https://discord.gg/",
        "author": {
            "name": "Name",
            "url": "https://discord.com/",
            "icon_url": "https://unsplash.it/100"
        },
        "thumbnail": {
            "url": "https://unsplash.it/200"
        },
        "image": {
            "url": "https://unsplash.it/380/200"
        },
        "footer": {
            "text": "Name",
            "icon_url": "https://unsplash.it/100"
        },
        "fields": [
            {
                "name": "Visit our website for more information about the project!",
                "value": "[ai-gen.club](https://website.com/)"
            },
            {
                "name": "Check our socials!",
                "value": "[Twitter](https://twitter.com) and [Instagram](https://www.instagram.com)!",
                "inline": true
            },
            {
                "name": "Join our Discord!",
                "value": "> [Take me there!](https://discord.gg/PpgZMYhK)",
                "inline": false
            }
        ] 
}
Descatres commented 2 years ago

Update:

I followed the teamplate on this repo for the embeds and ended up with this:


{
    "title": "We are Name",
    "description": "Join our discord to know more about our project!\nWe hope you enjoy our work!",
    "redirect": "https://website.com/",
    "color": "#f7267d",
    "author": {
        "name": "Discord",
        "url": "https://discord.gg"
    },
    "provider": {
        "name": "Website",
        "url": "https://website.com/"
    },
    "image": {
        "thumbnail": false,
        "url": "https://ai-gen.club/img/gallery/All/Fantasy%20Rain%20forest%2014202256421747768151-200.png",
        "info": ""
    }    
}

Hope it helps!

V4NSH4J commented 2 years ago

Hey! A bit more details on this, Discord removed regular embeds, so now we're using links to send embeds. They don't support all fields like before, so you would have to follow the template. In your message.json you can only have the content field (which is a regular discord message) and you have to follow the format for that as well, as it's an array of messages, one message is sent at random from the list. Hope you have a bit more clarity!

Descatres commented 2 years ago

We ended up making our own embed using this. Thank you very much for your work!!