diff --git a/src/api/util.cpp b/src/api/util.cpp new file mode 100644 index 0000000..9975640 --- /dev/null +++ b/src/api/util.cpp @@ -0,0 +1,24 @@ +#include "util.h" + +using namespace dpp; + +#define SR_IMAGE "https://i.imgur.com/MV4i9oF.png" + +uint32_t util::getHexColor(EmbedType type) { + switch (type) { + case ERROR: + return 0xde1f1f; + case SUCCESS: + return 0x2ecc71; + case INFO: + return 0x748AD6; + } +} + +embed util::getDefaultEmbed(EmbedType type) { + embed e; + e.set_footer("Sheepstar", SR_IMAGE); + e.set_timestamp(time(nullptr)); + e.set_color(getHexColor(type)); + return e; +} \ No newline at end of file