Created the util.cpp
This commit is contained in:
parent
11a2ff2c5f
commit
4038369e46
24
src/api/util.cpp
Normal file
24
src/api/util.cpp
Normal file
@ -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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user