feat: discord call api #1

Merged
Clement merged 6 commits from feat--discord-call-api into master 2023-08-18 17:50:35 +00:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 95161bc382 - Show all commits

View File

@ -31,7 +31,7 @@ bool DiscordAPI::sendMessage(String trame){
}
bool DiscordAPI::sendheure(String hStart, String hEnd){
bool DiscordAPI::sendHeure(String hStart, String hEnd){
int color = random(16777215);
String trame = "{\"embeds\": [{\"title\": \"Le Lab est ouvert !\",\"description\": \"Le Lab est ouvert de **"+ hStart +"** à **"+ hEnd +"**\",\"color\": \"" + color + "\"}]}";
return this->sendMessage(trame);

View File

@ -23,9 +23,8 @@ Program::Program() {
this->discord = new DiscordAPI(DISCORD_HOOK);
Serial.println(this->discord->sendMessage("hello the world !!"));
delay(1000);
Serial.println(this->discord->sendheure("10h", "18h"));
Serial.println(this->discord->sendHeure("10h", "18h"));
}
void Program::loop() {