Basically, you cannot encode a data even if its correctly typed using a local script
Try to fire the message in replicated storage and encode it there and post it
And you cannot access any service mostly using a local script, use a remote event in that scripts and keep a server side script for it
And enable https service
Check this out if needed: Discord Integration: A guide on using Discord through Roblox [UPDATED]