For accessing the server, Discord and FiveM must be linked. You can check by opening FiveM with Discord open, and checking that Discord is listed in the Connected Accounts under "Settings".
If it's not listed, there are a few solutions to the problem. First, be sure Discord isn't running in administrator mode. For whatever reason it effects the game's ability to connect. Just restart Discord out of admin mode, then restart Discord.
If the connection still isn't there, You can attempt to delete the FiveM cache, as well as Discord's cache. Close both, then delete FiveM's b