A bot created with Python that interacts with GroupMe

Overview

GroupMe_Bot

This is a bot I'm working on a small groupme group I'm in. This is something I'll work on in my spare time. Nothing but just a fun little side project for when I'm bored.

Libraries used

Groupy: an API wrapper for Groupme

python-atomicwrites: Powerful Python library for atomic file writes

google-api-python-client (only needed if you will be doing yt searches from the bot)

Documentation for Groupy

Instructions

Before the bot can listen to a group, it needs to be added to that group. Do that first or the bot won't work.

There are two ways to run the bot.

  1. python3 start.py
  2. Docker

Make sure to change the information in main.py to what you want such as the location of your groupme key or youtube key.

You have to pick a deliminator to use this bot. The default one is $. You can change it by passing it to the bot object

Config and Credentials

The bot looks for Credentials in config.ini that is at the root of the repo. An example file has been provided.

Here you can modify some other settings such as the delimeter used, how often the bot will look for messages, and how often the bot will refresh the names and members of the group.

Groups

On first start (assuming a groups.json doesn't exist), the bot will prompt you to select what groups to listen to. It will create a groups.json where the key is the group name and the value will be a dictionary with an id and enabled keys. If enabled is set to true, it will listen to that chat. id is the group id and since it will use that to find the group, the group name can change but the bot will still be able to listen to it. If you are running this from docker, it is best to use the docker command below but with -it first instead of -ditv

JSON structure of groups.json

{
  "group1": {"enabled": true, "id": "1000123123"},
  "group2": {"enabled": false, "id": "834234235"}
}

Docker

Using the provided Dockerfile, you can build an image with docker build -t groupme-bot .

If you don't mount a volume to the container, any tags that are made will be lost once the container is stopped.

If you don't mount a volume that contains groupme.key to /app/creds, you need to pass it in as an environmental variable

Once the image is built, you can run it with:

docker run -ditv --rm -v [local tag folder]:/app/tags -v [local creds folder]:/app/creds -v [local groups.json]:/home/groupme/app/groups.json --name groupme groupme-bot

add -m [amount] or --cpus=[number] to limit the ram or CPU cores the container can use

To attach to a detached container, follow these steps (assuming you ran it with the -it arguments):

docker ps to find the Container ID

docker attach [Container ID] to attach to it

docker stop [Container ID] to stop the container

Ctrl-C to shutdown the container

Ctrl-p Ctrl-q to detach from it

Commands

Everything command should lead with the delimiter (the default delimiter is "$")

command argument(s) example
avatar [mention_name] avatar @name
git none git
yt** [query] yt skateboard tricks

** yt command will only post the first link from the youtube search

Tag System

command argument(s) example
create [tag_name] [stuff]** tag create cooltag this is a cool tag
edit [tag_name] [stuff]** tag edit cooltag this is a new edit
delete [tag_name] tag delete cooltag
none [tag_name] tag cooltag
list none tag list
owner [tag_name] tag owner cooltag
gift [tag_name] @mention tag gift cooltag @new_owner
rename [tag_name] [new tag_name] tag rename cooltag coolertag
help none tag help

** [stuff] can be a string, a link to anything, or an image that is upload through groupme

** If [stuff] is an image uploaded through groupme, then the description with the image should just be:

tag create [tag_name]

The commands create, edit, delete, gift, and rename can only be down by the owner of the tag. The owner is whoever created the tag.

owner command will get the user_id of the owner and will find attempt to match it to the nickname of the owner.

JSON structure

This is the json structure of tags

{
 "id": "group id goes here",
 "name": "group name goes here",
 "tags": {
   "tag1": {
     "content": "tag1 content",
     "owner": "owner id"
   },
   "tag2": {
     "content": "tag2 content",
     "owner": "owner id"
   }
 }
}
Owner
20 something year old guy who is into anything tech related
⚑ PoC: Hide a c&c botnet in the discord client. (Proof Of Concept)

πŸ‘¨β€πŸ’» Discord Self Bot πŸ‘¨β€πŸ’» A Discord Self-Bot in Python by natrix Installation Run: selfbot.bat Python: version : 3.8 Modules

0Ρ…VΞΉcΠ½y#1337 37 Oct 21, 2022
:globe_with_meridians: A Python wrapper for the Geocodio geolocation service API

Py-Geocodio Python wrapper for Geocodio geocoding API. Full documentation on Read the Docs. If you are upgrading from a version prior to 0.2.0 please

Ben Lopatin 84 Aug 02, 2022
Tickergram is a Telegram bot to look up quotes, charts, general market sentiment and more.

Tickergram is a Telegram bot to look up quotes, charts, general market sentiment and more.

Alberto Ortega 25 Nov 26, 2022
Manage Proxmox KVM Virtual Machines via Slack bot.

proxmox-slack-bot Create KVM Virtual Machines on Proxmox, the easy way. Not much works works here yet... Setup dev environment Setup fully editable st

Plenus Pyramis 3 Mar 20, 2022
Python client library for Postmark API

Postmarker Python client library for Postmark API. Gitter: https://gitter.im/Stranger6667/postmarker Installation Postmarker can be obtained with pip:

Dmitry Dygalo 109 Dec 13, 2022
A telegram bot to track whales activities on multiple blockchains.

Telegram Bot : Whale Watcher A straightforward telegram bot written in python to track whales activity on multiple blockchains, using whale-alert API

Laurenz Bougan 1 Dec 10, 2021
Async client API for the Telegram Group Calls

PyTgCalls This project allow to make Telegram group call with MTProto Api using Pyrogram and WebRTC, this is possible thanks to the power of NodeJS's

185 Jan 03, 2023
This project is a basic login system in terminal for Discord

Welcome to Discord Login System(Terminal) πŸ‘‹ This project is a basic login system in terminal for Discord Author πŸ‘€ arukovic Github: @SONIC-CODEZ Show

SONIC-CODEZ 2 Feb 11, 2022
Twitter bot that finds new friends in Twitter.

PythonTwitterBot Twitter Bot Thats Find New Friends pip install textblob pip install tweepy pip install googletrans check requirements.txt file Env

IbukiYoshida 4 Aug 11, 2021
Customizable and open-sourced bot for a few private servers

MarlBot A private bot for controlling monkeys and turtles. Why does this bot exist? The bot exists as a general-purpose community bot for a select few

KR 1 Jan 18, 2022
Name says it all/Instructions are in README file.

Discord-Webhook-Spammer Name says it all/Instructions are in README file. Setup 1. pip install discord-webhook ( In console, terminal or whatever you

Catto 1 Mar 21, 2022
Python JIRA Library is the easiest way to automate JIRA. Support for py27 was dropped on 2019-10-14, do not raise bugs related to it.

Jira Python Library This library eases the use of the Jira REST API from Python and it has been used in production for years. As this is an open-sourc

PyContribs 1.7k Jan 06, 2023
New developed moderation discord bot by archisha

Monitor42 New developed moderation discord bot by Ξ±rchΞΉshΞ±#5518. Details Prefix: 42! Commands: Moderation Use 42!help to get command list. Invite http

Kamilla Youver 0 Jun 29, 2022
A delivery protection and notification system

DeliveryProtect This project builds a delivery protection and notification system, based on integration of Arduino Uno and Raspberry Pi 4. The codes a

2 Dec 13, 2021
HackZ-Token-Grabber-V2 - HackZ Token Grabber V2

HackZ-Token-Grabber-V2 was made by Love ❌ code βœ… β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž β€Ž 🌟

! β„’NightMare 2 Mar 01, 2022
A project that alerts me when there's a dog outside so I can go look at it.

Dog Detector A project that alerts me when there's a dog outside so I can go look at it. Tech Specs This script uses the YOLOv3 object detection model

rydercalmdown 58 Jul 29, 2022
Asynchronous RDP/VNC client for Python (GUI)

🚩 This is the public repository of aardwolf, for latest version and updates please consider supporting us through https://porchetta.industries/ AARDW

29 Dec 15, 2022
MicroStealer - A compact Discord Token Logger/Discord Token Grabber made in only 15 lines of code! Injects into discord for long-term use

πŸ’Ύ MicroStealer ⚑ A compact Discord Token Logger/Discord Token Grabber made in o

DeKrypt 24 Sep 21, 2022
πŸ§‘β€πŸ’Ό Python wrapper for the Seek API

seek-com-au-api πŸ§‘β€πŸ’Ό Python wrapper for the seek.com.au API (unofficial) Installation Using Python = 3.6: pip install -e git+https://github.com/tomq

Tom Quirk 1 Oct 24, 2021
A collection of tools for managing Jira issues for the RHODS project

RHODS-Jira-Tools A collection of tools for managing Jira issues for the RHODS project move_to_qa.py This script handles transitioning a given Jira iss

Alex Corvin 1 Sep 20, 2022