File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,19 @@ slashcommand& slashcommand::fill_from_json_impl(nlohmann::json* j) {
74
74
75
75
type = (slashcommand_contextmenu_type)int8_not_null (j, " type" );
76
76
set_object_array_not_null<command_option>(j, " options" , options); // command_option fills recursive
77
-
78
- if (auto it = j->find (" integration_types" ); it != j->end ()) {
79
- it->get_to (this ->integration_types );
77
+
78
+ if (j->contains (" integration_types" )) {
79
+ if (auto it = j->find (" integration_types" ); it != j->end () && !it->is_null ()) {
80
+ it->get_to (this ->integration_types );
81
+ }
80
82
}
81
83
82
- if (auto it = j->find (" contexts" ); it != j->end ()) {
83
- it->get_to (this ->contexts );
84
+ if (j->contains (" contexts" )) {
85
+ if (auto it = j->find (" contexts" ); it != j->end () && !it->is_null ()) {
86
+ it->get_to (this ->contexts );
87
+ }
84
88
}
89
+
85
90
return *this ;
86
91
}
87
92
You can’t perform that action at this time.
0 commit comments