MysteryPancake / Discord-Reposter

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

Loop messages between 2 channels #32

Closed pNbaz closed 4 years ago

pNbaz commented 4 years ago

Hello, if I link 2 channels to forward the messages back and forth, is there a way that the bot ignores his own messages? Right now if I link, as example: channel A to send messages to channel B channel B to send messages to channel A The bot enters in a loop where it sees his own messages and this way it send a messages without end.

MysteryPancake commented 4 years ago

I think the bot could ignore itself by adding this below line 221: if (message.author.user === client.user) return; I will try to add a toggle for this later.

pNbaz commented 4 years ago

Unfortunatelly, the issue is still there. I've added the code, but the bot behaves the same, if both channels are added to list.

image

image

MysteryPancake commented 4 years ago

I am sorry, I think I made a mistake. I think it should have been this line instead: if (message.author.id === client.user.id) return; Please tell me if this works.

pNbaz commented 4 years ago

The bot works now as intended. Thanks alot for your time and help <3