Upload files to "src"
This commit is contained in:
@@ -1,12 +1,22 @@
|
|||||||
#include "godsBot.h"
|
#include "godsBot.h"
|
||||||
|
|
||||||
bool parseMessage(const struct discord_message *msg){
|
void toLowercase(const struct discord_message *msg){
|
||||||
|
|
||||||
|
for (int i = 0; msg->content[i] != '\0'; i++) {
|
||||||
|
msg->content[i] = tolower(msg->content[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool parseMessage(const struct discord_message *msg){
|
||||||
|
size_t len = strlen(msg->content);
|
||||||
|
toLowercase(msg);
|
||||||
|
if(len >=512) return false;
|
||||||
if(!msg) return false;
|
if(!msg) return false;
|
||||||
|
if(msg->content[0] != '$') return false;
|
||||||
if(!msg->author) return false;
|
if(!msg->author) return false;
|
||||||
if(msg->author->bot) return false;
|
if(msg->author->bot) return false;
|
||||||
if(!msg->content) return false;
|
if(!msg->content) return false;
|
||||||
if(msg->content[0] != '$') return false;
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user