I managed to fix the issue on my own. The problem is when the message is being sent on discord, it is calling the AdminChat hook OnAdminChat() which is getting processed by discord chat every time it is called. I had to modify both the DiscordChat plugin and the AdminChat plugin to make it recognize that the message is coming from discord and should not be processed on discord. The basic idea is to pass a boolean through the hook when sending the message from discord so it knows it is coming from discord. I made too many changes to write them here so I'll post the source code for both plugins for anyone to use if they run into the same problem as me.
AdminChat: https://pastebin.com/vUXaUTAh
DiscordChat: https://pastebin.com/LFuGScy7