Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: changed the notes on read_file. #896

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/dpp/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ namespace dpp {

/**
* @brief Read a whole file into a std::string.
* Be sure you have enough memory to read the file, if you are reading a large file.
* @note Be aware this function can block! If you are regularly reading large files, consider caching them.
* @note This function can take a while if this is a large file, causing events to not reply and also taking up a lot of memory. Make sure you have enough memory, and use dpp::interaction_create_t::thinking in events where you call this function on big files.
* @warning Be aware this function can block! If you are regularly reading large files, consider caching them.
* @param filename The path to the file to read
* @return std::string The file contents
* @throw dpp::file_exception on failure to read the entire file
Expand Down