Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Messages not working with DM channels #14

Open
tzwartfv opened this issue Jun 15, 2020 · 1 comment
Open

Send Messages not working with DM channels #14

tzwartfv opened this issue Jun 15, 2020 · 1 comment
Labels
V3 Marked issue will be fixed (resolved) in version 3

Comments

@tzwartfv
Copy link

The Problem:

When the discord send messages node is used to send a message to a direct message (DM) channel, an error occurs:

Couldn't send to channel '<Channel Number>': channel not found.

Reproducing the Error:

For this error to occur, I have a simple flow consisting of a discord get messages node, leading into a function node that reads:

message = {
    payload: "Anything",
    channel: msg.channel.id
}
return message;

Which then outputs into a discord send messages node.

When a message is sent to the bot in a server channel, the response is as expected, with the bot replying "Anything". However, when a message is sent to the bot through a DM channel, the error occurs.

The Flow:

[
    {
        "id": "65a5b58f.3f8704",
        "type": "tab",
        "label": "Discord Reply Flow",
        "disabled": false,
        "info": ""
    },
    {
        "id": "5416c1c8.c5d9d",
        "type": "discord-get-messages",
        "z": "65a5b58f.3f8704",
        "name": "",
        "token": "",
        "channels": "",
        "x": 108.125,
        "y": 422.5,
        "wires": [
            [
                "d89ad182.49c57"
            ]
        ]
    },
    {
        "id": "113fd53a.8094f3",
        "type": "discord-send-messages",
        "z": "65a5b58f.3f8704",
        "name": "",
        "channel": "",
        "token": "",
        "x": 513.625,
        "y": 422.5,
        "wires": []
    },
    {
        "id": "d89ad182.49c57",
        "type": "function",
        "z": "65a5b58f.3f8704",
        "name": "",
        "func": "message = {\n    payload: \"Anything\",\n    channel: msg.channel.id\n}\nreturn message;",
        "outputs": 1,
        "noerr": 0,
        "x": 314.375,
        "y": 422.5,
        "wires": [
            [
                "113fd53a.8094f3"
            ]
        ]
    }
]
@madmax3365
Copy link
Owner

madmax3365 commented Aug 5, 2020

Yep. Sending DM functionality not yet implemented. I was planning to add this feature and update discord.js to the latest version, but for now, I can't find time for this.

@madmax3365 madmax3365 added the V3 Marked issue will be fixed (resolved) in version 3 label Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3 Marked issue will be fixed (resolved) in version 3
Projects
None yet
Development

No branches or pull requests

2 participants