aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2023-04-15 16:01:26 -0400
committerCara Salter <cara@devcara.com>2023-04-15 16:01:26 -0400
commite3aeb94c0e8cb920022d67e59911e2917c4a5b78 (patch)
tree342cdbd933f7d43e4f47e4d310eca9d296dbbfa7
parent55abcede00896ff02d7da4577190adcb263867f1 (diff)
download142bot-e3aeb94c0e8cb920022d67e59911e2917c4a5b78.tar.gz
142bot-e3aeb94c0e8cb920022d67e59911e2917c4a5b78.zip
Update README
Change-Id: Ic7ec9198f5f4917a01102612879eaac693f9c8c4
-rw-r--r--CMakeLists.txt1
-rw-r--r--README.md28
2 files changed, 28 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a7d3ea5..22b9ef7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,5 @@ foreach (fullmodname ${subdirlist})
add_library(module_${modname} SHARED ${modsrc})
add_dependencies(module_${modname} dpp cpr spdlog fmt)
target_link_libraries(module_${modname} dpp cpr sentry)
- install(TARGETS module_${modname} RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/142bot/")
set_target_properties(module_${modname} PROPERTIES PREFIX "")
endforeach(fullmodname)
diff --git a/README.md b/README.md
index 5ab1b07..fa120b1 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,31 @@
# 142bot
Discord bot for the residents and friends of 142 West St.
+
+# Installation
+
+Compile as you would any "normal" CMake project:
+```
+cmake -B build -DCMAKE_BUILD_TYPE='Release' -Wno-dev && cmake --build build
+```
+
+Then, do whatever you want with the `142bot` and `module_*.so` files, but they should be grouped together logically, as the `module_*.so` files contain the runtime code for dynamic modules.
+
+Make sure to run `cmake --install build` to install the header files and necessary shared library files (like dpp, cpr, etc).
+
+This project depends on `libpqxx`, which should be installed outside of the project. All other dependencies (dpp, etc) will be compiled and installed through CMake.
+
+## Configuration
+The main configuration can be found in the CWD's `config.json` file. There's a `config.example.json` in the repo to help you make this.
+
+Use of the `reactions` module requires an additional file, `resources/reactions.json` that contains a mapping between keywords and what reactions to add. There's another example in the repository.
+
+# Development
+
+There's a separation in this project between code that responds to Discord events and code that provides functionality to those pieces of code. Any code that interacts directly with Discord should probably live in a module, whereas anything providing utility functions should live outside of modules.
+
+Speaking of modules...
+
+## Modules
+
+Modules are dynamically loaded at runtime to provide extra functionality to the bot. A bot that doesn't respond to any input is pretty boring! \ No newline at end of file