Skip to content

Commit

Permalink
- Updated submodules
Browse files Browse the repository at this point in the history
- Changes payload to body
- Added fix from issue #9
  • Loading branch information
tostc committed Oct 6, 2020
1 parent 0d2c584 commit b687f1e
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 10 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.3.0)
project(discordbot VERSION 2.2.0 LANGUAGES CXX)
project(discordbot VERSION 2.2.1 LANGUAGES CXX)

include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)

Expand Down Expand Up @@ -61,6 +61,10 @@ ExternalProject_Add(IXWebSocket_build
TEST_COMMAND ""
DEPENDS mbedtls_build)

if(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm|aarch64)")
set(OPUS_DISABLE_INTRINSICS ON CACHE BOOL "")
endif()

add_subdirectory(${PROJECT_SOURCE_DIR}/externals/opus EXCLUDE_FROM_ALL)

if(NOT WIN32)
Expand Down
4 changes: 4 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Need help? Feel free to join our Discord Server.

[![Discord Server](https://discordapp.com/api/guilds/711169228320931840/embed.png?style=banner2)](https://discord.gg/C79vGZb)

If you like this library please give me a ![star](star.png)

## Feeling adventurous?
You can clone the development branch if you want the latest and probably buggy stuff. This is not recommended for productivity programs.

Expand All @@ -23,6 +25,8 @@ First you need following software and libraries.
* C++ compiler which supports C++14
* Compiles with clang and gcc under Linux.
* Compiles with Visual Studio 2019 under Windows.
* Maybe runs flawless on the Raspberry Pi (not Tested)
* For more informations please visit [this](https://github.com/tostc/libDiscordBot/issues/9#issue-715171899) issue, and look under `Compiling the bot with the lib:`

## Getting Started
These instructions will help you compile and use the library to build your own bot.
Expand Down
2 changes: 1 addition & 1 deletion externals/CJSON
Submodule CJSON updated 1 files
+71 −2 JSON.hpp
2 changes: 1 addition & 1 deletion externals/CLog
Submodule CLog updated 1 files
+21 −0 LICENSE.txt
2 changes: 1 addition & 1 deletion externals/IXWebSocket
Submodule IXWebSocket updated 574 files
2 changes: 1 addition & 1 deletion externals/mbedtls
6 changes: 3 additions & 3 deletions src/controller/DiscordClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ namespace DiscordBot
llog << lerror << "Failed to send message HTTP: " << res->statusCode << " MSG: " << res->errorMsg << lendl;
else
{
json.ParseObject(res->payload);
json.ParseObject(res->body);
Channel c = CreateChannel(json);

SendMessage(c, Text, embed, TTS);
Expand Down Expand Up @@ -319,7 +319,7 @@ namespace DiscordBot
try
{
CJSON json;
m_Gateway = json.Deserialize<std::shared_ptr<SGateway>>(res->payload);
m_Gateway = json.Deserialize<std::shared_ptr<SGateway>>(res->body);
}
catch (const CJSONException &e)
{
Expand Down Expand Up @@ -1237,7 +1237,7 @@ namespace DiscordBot
try
{
CJSON JOwner;
JOwner.ParseObject(res->payload);
JOwner.ParseObject(res->body);

Ret = CreateMember(JOwner, guild);
}
Expand Down
Binary file added star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b687f1e

Please sign in to comment.