Skip to main content

# MockBot [![MockBot version](https://img.shields.io/pypi/v/MockBot.svg)](https://pypi.org/project/MockBot)

A Bot that responds with the “spongemock” version of a message when sent by a particular user.

### Author

Daniel Gisolfi - All current work - [dgisolfi](https://github.com/dgisolfi)

## Groupme Bot

A GroupMe bot can be created [here](https://dev.groupme.com/bots) and using the Groupme API can send messages to its assigned group. This particular bot uses a callback URL to be notified of new messages. Once notified the message will be parsed and a response will be created if the USER_ID of the sender matches that of the USER_ID environment variable.

## Usage

Once a bot is registered with Groupme the following requirements must be specified in the form of environment variables:

  • USER_ID - The ID of the user that should be mocked in the group chat.

    Example: USER_ID=29384

  • BOT_ID - The assigned bot ID by GroupMe.

    Example: BOT_ID=a6a7a7a7a7a7a7a7a77a7a7

  • GROUP_ID - The ID of the Groupme Chat where the bot resides

    Example: GROUP_ID=0987890987

  • API_TOKEN - The api token for the authorized Groupme account

    Example: API_TOKEN=983u4ritgo0v98ujkorf

After the environment variables have been set run the Flask server, python -m MockBot

## Customization/Additions

Feature Additions/Suggestions are welcome, for any particular functionality that may need to be added for a particular use case, simple parse the incoming messages looking for specified input in the server.py file and add methods in the bot class to perform the desired function.

Metadata

Release files for MockBot 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MockBot 1.0.0
File Size Uploaded
MockBot-1.0.0.tar.gz 3.2 kB Details

Release files / MockBot-1.0.0.tar.gz

Download URL MockBot-1.0.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
313b7ed4d66d2f194d1ba913da47da9989b7a7bea23b1963a8d5081993be6615
BLAKE2b-256 checksum
How to use checksums
8661b1fe01f179f635c9eb10f5f32648bf84ce1c4bdffb6c4c4e50667bad7128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page