This commit is contained in:
fluttershy 2025-01-25 12:52:32 +05:00
parent ff66de918f
commit fc402ce9c1
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ set(LIBS ${CMAKE_SOURCE_DIR}/libs/)
set(INCLUDE ${CMAKE_SOURCE_DIR}/include/)
set(TESTS ${CMAKE_SOURCE_DIR}/tests)
set(ADDITIONAL_CXX_FLAGS_DEBUG "-pipe -Wall -Wextra -O0 -fsanitize=address")
set(ADDITIONAL_CXX_FLAGS_RELEASE "-march=native -pipe -Wall -fsanitize=address -Wextra -O2 -flto")
set(ADDITIONAL_CXX_FLAGS_RELEASE "-march=native -pipe -Wall -Wextra -O2 -flto")
find_package(CURL REQUIRED)
find_path(IXWEBSOCKET_INCLUDE_DIR ixwebsocket)

View File

@ -7,9 +7,9 @@ int main(int argc, char* argv[]) {
std::cout << DiscordEndpoints::details::latest << std::endl;
});
bot->on(GatewayEvents::MESSAGE_CREATE, [](const Discord<Message, User, Author, Message::Api>& msg) {
if (msg.get<2>().isBot == false) {
msg.get<0>().send("939957962972229634", msg.get<0>().pack("content", std::to_string(msg.get<3>().latency()) + "ms"));
if (!msg.get<2>().isBot) {
msg.get<0>().send("939957962972229634", msg.get<0>().pack("content", msg.get<2>().avatar));
msg.get<0>().send("939957962972229634", msg.get<0>().pack("content", std::to_string(msg.get<3>().latency()) + "ms"));
}
});
bot->start();