Dedigraz / whatsticker

Converting from image/gif/videos on whatsapp to a sticker by using a caption in a chat where the bot is present

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whatsticker

⚠️ ⚠️ The live number is currently banned by WhatsApp so it no longer works, we are investigating ways to avoid ban, one of which may involve a hefty rewrite to use whatsapp official api ⚠️ ⚠️

mythra

A Whatsapp bot that turns pictures, small videos and gifs into stickers with the caption stickerize

Chat with Whatsticker

Usage

example_video.mp4

Simple Requirements

If you are not interested in running a copy of the project then feel free to use the whatsticker number provided. You can also add it to group chats and it will work the exact same way. There might be occasional downtime but except it gets blocked it should be pretty reliable

Technical Requirements

Generating Credentials

  • Download Go modules

    # Downloads go modules
    go mod tidy
  • Run go run main.go to show qr code for login on terminal

    Example QR Code

  • Link device as explained on WhatsApp FAQ

A folder master/db/ will be automatically created containing sqlite db with credentials. No need to login over and over except logged out on main device. You can copy this folder to target machine and it still works

Running The Bot

  • Ensure master/db/examplestore.db exists and run docker-compose up
  • Open any chat (Personal/Group) where the logged in number is present
  • Send media with caption and number should respond with sticker

WARNING: master/db/ folder will contain examplestore.db which docker-compose expects to load as a volume. Do not create a public image using this folder or commit to version control as it can be used to impersonate you

CLI Flags

The following flags are available

  • -log-level : To switch between log verbosity between INFO and DEBUG
  • -reply-to : Set to true if bot should quote original messages with reply
  • -sender : Respond to only this jid e.g 234XXXXXXXXXX

Architecture

Arch Diagram

Open the architecture on draw.io

Limits/Issues

  • Media sizes/length enforced by code
  • Some sticker results for videos are not animated (WebP size exceeds 1MB)
  • Sometimes original media cannot be downloaded (especially for quoting older media messages with caption)
  • reply-to flag causes iOS users to be incorrectly tagged

License

This project is opened under the MIT License which allows very broad use for both academic and commercial purposes

Credits

Library/Resource Use
tulir/whatsmeow whatsmeow is a Go library for the WhatsApp web multidevice API.
ffmpeg A complete cross platform solution to record, convert and stream video (and audio).
cwebp Compress an image file into WebP file
webpmux Write exif file to set metadata on stickers
prometheus Live metrics of stickerization

About

Converting from image/gif/videos on whatsapp to a sticker by using a caption in a chat where the bot is present

License:MIT License


Languages

Language:Go 95.4%Language:Dockerfile 4.6%