GithubHelp home page GithubHelp logo

popobot's Introduction

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

Install from Pypi:

pip install popobot

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!')

PoPoBot supports:

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

popobot's People

Contributors

hydrogest avatar

Stargazers

 avatar

Watchers

 avatar

popobot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.