change concord starter code to my style
This commit is contained in:
parent
ae59db9673
commit
46c887b19a
|
@ -6,11 +6,11 @@
|
|||
|
||||
sqlite3* db;
|
||||
|
||||
void on_ready(struct discord *client, const struct discord_ready *msg) {
|
||||
log_info("Logged in as %s!", msg->user->username);
|
||||
void on_ready(struct discord* client, const struct discord_ready* event) {
|
||||
log_info("Logged in as %s!", event->user->username);
|
||||
}
|
||||
|
||||
void on_message(struct discord *client, const struct discord_message *msg) {
|
||||
void on_message(struct discord* client, const struct discord_message* msg) {
|
||||
if(msg->type == DISCORD_MESSAGE_REPLY && msg->content != NULL) {
|
||||
char* error;
|
||||
if(sqlite3_exec(db, sqlite3_mprintf(
|
||||
|
@ -36,7 +36,7 @@ int main(void) {
|
|||
log_error(error);
|
||||
}
|
||||
|
||||
struct discord *client = discord_config_init("config.json");
|
||||
struct discord* client = discord_config_init("config.json");
|
||||
discord_add_intents(client, DISCORD_GATEWAY_MESSAGE_CONTENT);
|
||||
discord_set_on_ready(client, &on_ready);
|
||||
discord_set_on_message_create(client, &on_message);
|
||||
|
|
Loading…
Reference in a new issue