Skip to main content

泡泡aiM机器人库

Project description

PoPoBot

A bot library for PoPoIM.

"PoPoIM" is a series of PHP chat source codes, including H5 mobile version, web version, and uniapp version.

Features

PoPoBot provides a series of APIs aimed at making it easy to create chatbots for PopoIM.

The supported features include:

  • Receiving messages
  • Sending messages to friends and groups
  • Group chat management (kicking members, muting, dissolving, inviting)
  • Accepting/rejecting friend requests
  • Viewing account messages
  • Logging out

And messages use Markdown, so you can send different type of content easily.

Usage

PoPoIM manages cookies in the form of 'session IDs', so you need to obtain the cookie by logging in to PoPoIM on a device, capturing the cookie through packet capture, and keeping logged in without logging out.

from popobot import *

cookie = '...' #Your cookie.
bot=Account(cookie) #Login to PoPoIM

Then you can manage your bot.

Example:

bot.SendGroupMessage(groupId,'Hello world!')

More functions:

SendGroupMessage(group, message) # Send group message
SendFriendMessage(friend, message) # Send friend message

GetGroupMessage(group, limit=20) # Get group messages
GetFriendMessage(friend, limit=20) # Get friend messages

GetInfo() # Get information

GetSelfInfo() # Get self information
GetFriendsList() # Get friends list
GetGroupList() # Get group list
GetChattings() # Get chatting list

GetApplyList() # Get apply list
GetApplyDetail(nid) # Get apply detail
AgreeApply(nid) # Agree to apply
RefuseApply(nid) # Refuse apply

GetGroupInfo(group) # Get group information
GroupKick(group, friend) # Kick member out of the group
GroupInvite(group, friend) # Invite user to join group
GroupLeave(group) # Leave group
GroupDel(group) # Disband group

ApplyFriend(friend) # Apply to add as a friends
FriendDel(friend) # Delete a Friend

Mute(group) # Mute the group
UnMute(group) # Unmute the group

Logout() # Logout

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

popobot-0.4.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

popobot-0.4-py2.py3-none-any.whl (3.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file popobot-0.4.tar.gz.

File metadata

  • Download URL: popobot-0.4.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.1

File hashes

Hashes for popobot-0.4.tar.gz
Algorithm Hash digest
SHA256 0e32d0dfda087f194568208894a608ec00575a785e5a345e173c39629eaf4d2f
MD5 c3a57fa6bfcbb6fbf5df2fb8f30b644f
BLAKE2b-256 f14411d793eab3a0472fc78083a5771733f6ae6f253d9279751b9fee82f32aac

See more details on using hashes here.

File details

Details for the file popobot-0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: popobot-0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.1

File hashes

Hashes for popobot-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8cd0dadf4e0c5dde5a4b06245a554fcb6cc161b137d3db4a5d1490a2b7c84ccb
MD5 6b837a4b8e4ee83b8736353fa14a8e14
BLAKE2b-256 8befaec8357feb48ca5b85341b7d6225d10f95ac3efd88821d10222445ca1570

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page