added starter build notes for Linux, added bot skipping jpegs from itself

This commit is contained in:
Harvey Fong 2025-08-14 09:33:59 -06:00
parent 2bbf800d53
commit 2963d5912c
3 changed files with 21 additions and 4 deletions

View File

@ -60,7 +60,7 @@ endif
# Library flags # Library flags
LIB_PATHS = -L$(DPP_BUILD_DIR) LIB_PATHS = -L$(DPP_BUILD_DIR)
LIBRARIES = -ldpp -lsqlite3 LIBRARIES = -ldpp
# Build type specific flags # Build type specific flags
ifeq ($(BUILD_TYPE), debug) ifeq ($(BUILD_TYPE), debug)

View File

@ -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 git clone https://github.com/brainboxdotcc/DPP.git
cd DPP cd DPP
cmake -B ./build cmake -B ./build
cmake --build ./build -j cmake --build ./build -j4
cd .. 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.h
curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h
make all -j make all -j4
``` ```

View File

@ -196,6 +196,11 @@ int main() {
}); });
bot.on_message_create([&image_processor, &bot](const dpp::message_create_t& event) { 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 // Check if the message has any attachments
if (!event.msg.attachments.empty()) { // if (!event.msg.attachments.empty()) { //
// Log that an attachment was found // Log that an attachment was found