MysteryPancake / Discord-Reposter

Bot for reposting Discord messages (work in progress)
MIT License
92 stars 121 forks source link

Query: If you stop commenting on the channel, you don't return to reposter #16

Open jack1230 opened 5 years ago

jack1230 commented 5 years ago

I have a question: It turns out that when I run "/repost to IDCHANNEL", I republish everything correctly and it ends with "Repost Complete!" but I would like to know how it can be done so that the repost does not stop, I mean that at any time they are commented on the channel and then it can be republished on the other channel in a matter of seconds. I would be grateful that you would help me how to fix it.

jack1230 commented 5 years ago

First I send the messages /repost to IDCHANNEL but once finished "Repost Complete!" I no longer copy what is written on the channel, but run /repostlive to retrieve the new messages but it still did not work, through the config.json the "live" appears empty and I thought that adding what is in "active" I can recover and copy any new message, but in visual studio code it showed me errors so I would like to know how it works /repostlive to retrieve the new messages that are arriving. Thanks for the help

MysteryPancake commented 5 years ago

/repostlive from <CHANNEL> or /repostlive to <CHANNEL> is intended to repost from/to a channel as new messages come in, although it only works on messages posted after the command is run.

If this command does not add the channel ID to "live" in the JSON file, then no messages will be reposted. This is probably a bug, so I will look into this when I have time.

This is a hacky idea, but it may work if you manually enter the channel info into the JSON file:

"live": {
    "<FROM_CHANNEL_ID>": {
        "channel": "<TO_CHANNEL_ID>"
    }
}