mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
join/leave guild
This commit is contained in:
14
discord/invite.cpp
Normal file
14
discord/invite.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "invite.hpp"
|
||||
|
||||
void from_json(const nlohmann::json &j, Invite &m) {
|
||||
JS_D("code", m.Code);
|
||||
JS_O("channel", m.Channel);
|
||||
JS_O("inviter", m.Inviter);
|
||||
JS_O("approximate_member_count", m.Members);
|
||||
|
||||
if (j.contains("guild")) {
|
||||
auto x = j.at("guild");
|
||||
x.at("id").get_to(m.Guild.ID);
|
||||
x.at("name").get_to(m.Guild.Name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user