From b4d31308aad8a7f47ee4dc657692fac95602dee9 Mon Sep 17 00:00:00 2001 From: m Date: Fri, 15 Dec 2023 21:39:58 -0600 Subject: [PATCH] fix discord ui script --- src/client/component/ui_scripting.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/client/component/ui_scripting.cpp b/src/client/component/ui_scripting.cpp index 2bc4aeef..d0590f71 100644 --- a/src/client/component/ui_scripting.cpp +++ b/src/client/component/ui_scripting.cpp @@ -9,6 +9,7 @@ #include "localized_strings.hpp" #include "console.hpp" +#include "discord.hpp" #include "download.hpp" #include "game_module.hpp" #include "fps.hpp" @@ -33,6 +34,8 @@ #include "steam/steam.hpp" +#include + namespace ui_scripting { namespace @@ -368,6 +371,16 @@ namespace ui_scripting download_table["userdownloadresponse"] = party::user_download_response; download_table["getwwwurl"] = party::get_server_connection_state().base_url; + + auto discord_table = table(); + lua["discord"] = discord_table; + + discord_table["respond"] = discord::respond; + discord_table["getavatarmaterial"] = discord::get_avatar_material; + discord_table["reply"] = table(); + discord_table["reply"]["yes"] = DISCORD_REPLY_YES; + discord_table["reply"]["ignore"] = DISCORD_REPLY_IGNORE; + discord_table["reply"]["no"] = DISCORD_REPLY_NO; } void start()