This repository was archived by the owner on Dec 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ struct create_text_channel_t
7474
7575struct create_voice_channel_t
7676{
77- create_voice_channel_t & name (snowflake param) { _name = param; return *this ; }
77+ create_voice_channel_t & name (const std::string param) { _name = param; return *this ; }
7878 create_voice_channel_t & bitrate (int32_t param) { _bitrate = param; return *this ; }
7979 create_voice_channel_t & user_limit (int32_t param) { _user_limit = param; return *this ; }
8080 create_voice_channel_t & parent_id (int64_t param) { _parent_id = param; return *this ; }
Original file line number Diff line number Diff line change @@ -627,9 +627,12 @@ AEGIS_DECL aegis::future<gateway::objects::channel> guild::create_voice_channel(
627627 json obj;
628628 obj[" name" ] = name;
629629 obj[" type" ] = 2 ;
630- obj[" bitrate" ] = bitrate;
631- obj[" user_limit" ] = user_limit;
632- obj[" parent_id" ] = parent_id;
630+ if (bitrate > 0 )
631+ obj[" bitrate" ] = bitrate;
632+ if (user_limit > 0 )
633+ obj[" user_limit" ] = user_limit;
634+ if (parent_id > 0 )
635+ obj[" parent_id" ] = parent_id;
633636 obj[" permission_overwrites" ] = json::array ();
634637 for (auto & p_ow : permission_overwrites)
635638 {
You can’t perform that action at this time.
0 commit comments