crimilo / Discord-Mirror

Make your account behave like a bot and mirror messages from a server to another.
MIT License
67 stars 38 forks source link

Errors mirroring multiple channels #74

Closed theredimposter closed 2 weeks ago

theredimposter commented 2 weeks ago

I am currently having issues trying to mirror multiple channels.

Initially when I tried this using the following format, the script would mirror the channels successfully but it would mirror every message from each channel to ALL webhooks multiple times.

token: "cool token"                                                                           
status: "invisible"                                                                                          
logMessage: ""  
mirrors:
   1:
      channelIds:                                                                                         
         - "000001"
         - "000002"    
         - "00003"                                                             
         - "00004"                                                                                                                               
      webhookUrls:                                                                                        
         - "https://discord.com/api/webhooks/abc123/12345"                                                          
         - "https://discord.com/api/webhooks/abc123/12345"                                                                                                                                       
         - "https://discord.com/api/webhooks/abc12345/1234567"                                                          
         - "https://discord.com/api/webhooks/abc12345/1234567"   
      requirements:                                                                                       
         minEmbedsCount: 0                                                                                
         minContentLength: 0                                                                              
         minAttachmentsCount: 0                                                                           

      options:                                                                                            
         useWebhookProfile: false 
         removeAttachments: false                    
         mirrorMessagesFromBots: true 
         mirrorReplyMessages: true 
         mirrorMessagesOnEdit: true 

I then tried the following format that was suggested but to no avail. The script itself runs but it fails to mirror any messages.

token: "cool token"                                                                           
status: "invisible"                                                                                          
logMessage: ""  
mirrors:
   1:
      channelIds:                                                                                         
         - "000001"                                                                                                                             
      webhookUrls:                                                                                        
         - "https://discord.com/api/webhooks/abc123/12345"     
   2:
      channelIds:                                                                                         
         - "000002"                                                                                                                             
      webhookUrls:                                                                                        
         - "https://discord.com/api/webhooks/abc123/12345"                                                          
   3:
      channelIds:                                                                                         
         - "00003"                                                                                                                             
      webhookUrls:                                                                                        
         - "https://discord.com/api/webhooks/abc12345/1234567"     
   4:
      channelIds:                                                                                         
         - "00004"                                                                                                                             
      webhookUrls:                                                                                        
         - "https://discord.com/api/webhooks/abc12345/1234567"     

      requirements:                                                                                       
         minEmbedsCount: 0                                                                                
         minContentLength: 0                                                                              
         minAttachmentsCount: 0                                                                           

      options:                                                                                            
         useWebhookProfile: false 
         removeAttachments: false                    
         mirrorMessagesFromBots: true 
         mirrorReplyMessages: true 
         mirrorMessagesOnEdit: true 

I would like to know what I am doing wrong. Could the issue be that I am trying to mirror two channels to one webhook? I would like to mention that I did try to mess around with some settings and noticed that the script eventually did work when adding a filter for one channel where I only wanted to mirror a single person's messages. The issue with this case was that only that single channel was being mirrored while the others failed to.

Any help is appreciated!

crimilo commented 2 weeks ago

the second version is correct, if its not working try adding some filters to each mirror and see if it works. ill do some testing when ill have the time to see if that's the issue

theredimposter commented 2 weeks ago

I got it to work. Having requirements, options, and filters posted to each mirror as you suggested did the trick. Thanks boss.