External Webpage Command

Hello everyone.

So I’ve being trying for a couple hours now to get some chat commands to work how I want them to work. Basically my server uses Discord for communication, and I want to set up a command when you say !discord it launches discord and makes you join the server. Now luckily discord already half do this, when you send someone an invite code and they click it, it launches their discord. However, it seems when using the link within steam browser it doesn’t launch discord, only takes you to the web version of it.


local function Ranks( ply, text, team )
    if string.sub( text, 1, 8) == "!discord" then
        ply:SendLua( [[gui.OpenURL( "https://discord.gg/QDgjDc2" ) ]] )
    end
end
hook.Add( "PlayerSay","Content", Content)

I need the command to launch someone’s web browser outside of the steam overlay. I’m not sure if this is possible, and I haven’t really found anything on the internet about it.

Take for example LoL. If i click on a discord link in there chat box. It will open the link in my browser with a web browser of it. So not sure if it even works

I don’t believe you can open other webbrowsers.

I have however, seen someone make a module for this to launch in googlechrome/default browser (I can’t find it now though :frowning: )

Does Discord have some sort of join link that only launches the program? Similar to teamspeaks ts3 joinserver link?

Yes it does, when you click the link it launches discord and joins the server.

https://github.com/WilliamVenner/OpenMyBrowser

Alright, this should work. Thanks everyone.