Previously, when replying in Discord threads, the replyToMode setting
was ignored because existingId was checked before replyToMode. This
caused reply references to be added even when replyToMode was set to
'off'.
This fix moves the replyToMode check before the existingId check,
ensuring that replyToMode: 'off' is respected in all contexts including
threads.