Giter Site home page Giter Site logo

tostc / libdiscordbot Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 3.0 1.27 MB

Easy to use Discord-bot framework.

License: MIT License

CMake 3.78% C++ 96.22%
bot cpp discord discord-bot discord-library discord-framework framework discord-music-bot cpp14 cpp-library

libdiscordbot's People

Contributors

elhison avatar tostc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

libdiscordbot's Issues

Compiling this on Raspberry Pi is... quite hard.

Lib dependency Opus:

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

Compiling the bot with the lib:

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.

Bot quits randomly

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):

  • OS: All platforms
  • Version 2.1.0-alpha

~/cmake/vla.c is missing

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:

CMakeOutput.log

Where is the CMakeLists.txt 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.