tostc / libdiscordbot Goto Github PK
View Code? Open in Web Editor NEWEasy to use Discord-bot framework.
License: MIT License
Easy to use Discord-bot framework.
License: MIT License
one of the dependencies, Opus, doesn't immediately compile on Raspberry. It needs the -DOPUS_DISABLE_INTRINSICS=ON
option when generating the CMake files in libDiscordBot/build
You can read the entire struggle of finding the solution here : xiph/opus#203
On Raspberry Pis, the default Atomic standard library doesn't include the call __atomic_fetch_add_8
. To compile the bot, the linker option -latomic
had to be added. I modified the CMakeLists.txt file as indicated below, following this StackOverflow answer, but I'm not sure at all if it's a good way to do it.
set(GCC_COVERAGE_LINK_FLAGS "-latomic")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
This is not a big deal, but I think it could be of interest to you.
Describe the bug
If the bot can't reconnect to discord the bot quits.
To Reproduce
Run the bot and after some time logs following inside the console
[ 2020-06-03 19:17:04 ] [ info ] Resumed
[ 2020-06-03 21:04:27 ] [ info ] Websocket closed code 1001 Reason Discord WebSocket requesting client reconnect.
[ 2020-06-03 21:04:28 ] [ info ] Resumed
Most time the bot reconnects but sometimes it ends with resumed. I think it's an invalid session.
Expected behavior
The bot reconnects or writes a message like "No Internet" or something else before it quits.
Desktop (please complete the following information):
CMake Error at /Users/icebunny08/libDiscordBot/build/CMakeFiles/CMakeTmp/CMakeLists.txt:14 (add_executable):
Cannot find source file:
/Users/icebunny08/libDiscordBot/cmake/vla.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at /Users/icebunny08/libDiscordBot/build/CMakeFiles/CMakeTmp/CMakeLists.txt:14 (add_executable):
No SOURCES given to target: cmTC_9e76f
CMake Error at externals/opus/cmake/CFeatureCheck.cmake:30 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
externals/opus/opus_config.cmake:20 (c_feature_check)
externals/opus/CMakeLists.txt:40 (include)
Log file:
D3CRYPT3D:build CottonTheButton$ cmake ../ CMake Error: The source directory "/Users/icebunny08/libDiscordBot" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.