fix discord ui script

This commit is contained in:
m 2023-12-15 21:39:58 -06:00
parent 5acb5f7ba0
commit b4d31308aa

View File

@ -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 <discord_rpc.h>
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()