Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempts to remove the user from the group #27

Closed
Vladyslav120604 opened this issue Oct 14, 2018 · 1 comment
Closed

Attempts to remove the user from the group #27

Vladyslav120604 opened this issue Oct 14, 2018 · 1 comment

Comments

@Vladyslav120604
Copy link

Hi guys,
I'm trying to remove users from groups.
As I know, I need to use setChatMemberStatus with chatMemberStatusLeft
I do it like this:
await client.invoke({ _: 'setChatMemberStatus', chat_id: chat_id, user_id: user_id, status: { _: 'chatMemberStatusLeft' } })
but I have mistake:
[ 1][t 0][1539547507.848958015][ClientJson.cpp:71] Failed to parse [request:{\0042@type\0042:\0042setChatMemberStatus\0042,\0042chat_id\0042:{\0042@type\0042:\0042chat\0042,\0042id\0042:-243305143,\0042type\0042:{\0042@type\0042:\0042chatTypeBasicGroup\0042,\0042basic_group_id\0042:243305143},\0042title\0042:\0042week1\0042,\0042last_message\0042:{\0042@type\0042:\0042message\0042,\0042id\0042:7116685312,\0042sender_user_id\0042:416593229,\0042chat_id\0042:-243305143,\0042is_outgoing\0042:true,\0042can_be_edited\0042:false,\0042can_be_forwarded\0042:false,\0042can_be_deleted_only_for_self\0042:true,\0042can_be_deleted_for_all_users\0042:true,\0042is_channel_post\0042:false,\0042contains_unread_mention\0042:false,\0042date\0042:1539503305,\0042edit_date\0042:0,\0042reply_to_message_id\0042:0,\0042ttl\0042:0,\0042ttl_expires_in\0042:0,\0042via_bot_user_id\0042:0,\0042author_signature\0042:\0042\0042,\0042views\0042:0,\0042media_album_id\0042:\00420\0042,\0042content\0042:{\0042@type\0042:\0042messageChatAddMembers\0042,\0042member_user_ids\0042:[622108130]}},\0042order\0042:\00426612116347058920067\0042,\0042is_pinned\0042:false,\0042is_marked_as_unread\0042:false,\0042is_sponsored\0042:false,\0042can_be_reported\0042:false,\0042default_disable_notification\0042:false,\0042unread_count\0042:0,\0042last_read_inbox_message_id\0042:0,\0042last_read_outbox_message_id\0042:6362759168,\0042unread_mention_count\0042:0,\0042notification_settings\0042:{\0042@type\0042:\0042chatNotificationSettings\0042,\0042use_default_mute_for\0042:true,\0042mute_for\0042:0,\0042use_default_sound\0042:true,\0042sound\0042:\0042\0042,\0042use_default_show_preview\0042:true,\0042show_preview\0042:false},\0042reply_markup_message_id\0042:0,\0042client_data\0042:\0042\0042},\0042user_id\0042:622108130,\0042status\0042:{\0042@type\0042:\0042chatMemberStatusLeft\0042},\0042@extra\0042:\0042d8dd721525dd94cb3b5ba59c97bec26b\0042}] [Error : 0 : Expected String or Number, got Object]

@Bannerets
Copy link
Owner

Bannerets commented Oct 14, 2018

Check your chat_id.
In your error chat_id is a chat object, not a number.

JSON from your error in pretty format https://pastebin.com/unTDuHfX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants