Skip to content

Commit

Permalink
Improve module check (closes #18)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafraser committed Dec 29, 2023
1 parent 45f0fe9 commit 9d4f91b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/cl_discord.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
-- This requires a special module to be installed before it works correctly
-- Sorry to disappoint you
if file.Find("lua/bin/gmcl_gdiscord_*.dll", "GAME")[1] == nil then return end
if not util.IsBinaryModuleInstalled("gdiscord") then
print("This session supports GDiscord Rich Presence, but you do not have the module installed.")
print("See https://github.com/fluffy-servers/gmod-discord-rpc for more info.")
return
end
require("gdiscord")

-- Configuration
Expand Down

0 comments on commit 9d4f91b

Please sign in to comment.