diff --git a/Makefile b/Makefile index 897d2d4..eea7114 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ endif # Library flags LIB_PATHS = -L$(DPP_BUILD_DIR) -LIBRARIES = -ldpp -lsqlite3 +LIBRARIES = -ldpp # Build type specific flags ifeq ($(BUILD_TYPE), debug) diff --git a/README.md b/README.md index 7c22ad0..46fb992 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ -These are just snippets of the full instructions +These are very similar to the instructions from https://git.indoodle.com/jason/bellatui + +Summary: +- we keep our repo limited to our .cpp and Makefile and .vcxproj +- we git clone thrid party repos and build using cli tools +- we include the headers using "../DPP/" "../bella_engine_sdk/" etc. This relative path avoids having to install systemwide libs when possible and these third party libs can get reused by other poomer apps +- we maintain a similar dir structure for all poomer apps as they are learning apps ``` @@ -7,9 +13,15 @@ cd workdir git clone https://github.com/brainboxdotcc/DPP.git cd DPP cmake -B ./build -cmake --build ./build -j +cmake --build ./build -j4 cd .. +git clone https://git.indoodle.com/oomer/poomer-discord-helloworld.git +cd poomer-discord-helloworld +git switch oomer/suggestions +``` +For a prototype app we can just dump the stb headers right into the helloworld dir for simplicity +``` curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image.h curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h -make all -j +make all -j4 ``` \ No newline at end of file diff --git a/poomer-discord-helloworld.cpp b/poomer-discord-helloworld.cpp index d721fcf..b9cfa04 100644 --- a/poomer-discord-helloworld.cpp +++ b/poomer-discord-helloworld.cpp @@ -196,6 +196,11 @@ int main() { }); bot.on_message_create([&image_processor, &bot](const dpp::message_create_t& event) { + // Ignore messages from the bot itself to prevent infinite loops + if (event.msg.author.id == bot.me.id) { + return; + } + // Check if the message has any attachments if (!event.msg.attachments.empty()) { // // Log that an attachment was found