MysteryPancake / Discord-Reposter

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

Bot Stopped - Is it possible to "Restart" from a certain Message? #24

Open MisterCookie1234 opened 4 years ago

MisterCookie1234 commented 4 years ago

Bot worked for about ~ 22 Hours til it stopped reposting. It posted over 20k Messages, but randomly stopped (somewhere at the 01st of November) It would be nice to let him rerun from that specific message on, where he stopped (via messageid) or from that date on.

Greetings and.. Merry Christmas

MysteryPancake commented 4 years ago

I think this should be possible by modifying line 361. By replacing after: "0" with after: "messageid", it should continue from a certain message rather than the first message.

I'm sorry about the bot randomly stopping, I am still trying to work out why this is. I think it is most likely due to the inactive function, which is meant to disable the bot when /repost stop is typed. Until I properly fix this, it might work to replace lines 49 to 51 with the following:


function inactive(from, to) {
    return false;
}
MisterCookie1234 commented 4 years ago

Hello!

Method 1 worked fine, i was able to repost the last messages.

Method 2 does not seem to work. Let the Bot "repost" live but it randomly stopped again.

MysteryPancake commented 4 years ago

That is very strange. I will look into this, but I am not sure why this is happening. Others have also had this issue, including myself.