MysteryPancake / Discord-Reposter

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

Webhook reposting. #15

Closed Yeahhahaha closed 5 years ago

Yeahhahaha commented 5 years ago

Is there a way to just leave the webhook name alone and just make it a certain name? (/repostlive)

MysteryPancake commented 5 years ago

This can be done by removing line 226.

If you want the bot to post the username but not rename itself, then also remove lines 225 to 227 and line 229, keeping line 228 which sends the name.

I will try to add a toggle for this once I get around to it

Yeahhahaha commented 5 years ago

This can be done by removing line 226.

If you want the bot to post the username but not rename itself, then also remove lines 225 to 227 and line 229, keeping line 228 which sends the name.

I will try to add a toggle for this once I get around to it

thank you for the quick reply, was also wondering if there is a way to make it send the message after a certain amount of seconds/mins/hours? - Using the /repostlivehook command.

MysteryPancake commented 5 years ago

This can be done with the setTimeout method of Discord.js.

I think it would work if line 487 was replaced with:

client.setTimeout(function() {
    repostLive(message);
}, 5000);

The delay time is in milliseconds, so 5000 is 5 seconds.