Skip to content

UnknownDecoder/decoder-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DecoderBot πŸ€–

A lightweight Python chatbot that responds to messages using exact or close matches with difflib.

PyPI version License: MIT Made with ❀️ by Unknown Decoder


πŸ’‘ What is DecoderBot?

DecoderBot is a simple Python class that lets you build a chatbot that replies to input messages based on:

  • Exact matches (like "hello")
  • Closest matches (like "helo" β†’ "hello"), if difflib is available

No extra libraries. No nonsense. Just logic.


πŸš€ Features

  • 🧠 Exact and fuzzy response matching
  • πŸ› οΈ Add or update responses easily
  • πŸ“¦ Zero external dependencies
  • πŸ”₯ Lightweight and fast

πŸ› οΈ How to Use

1. Clone or download the chatbot.py file.

2. Import and use it in your project:

from DecoderBot import ChatBot

bot = ChatBot("Your Bot Name")

# Add a custom response
bot.train_for("yo", "What's up?")

# Get exact match response
print(bot.get_response("yo"))  # Output: What's up?

# Get a close match response (e.g. "helo" β†’ "hello")
try:
    print(bot.get_closest_response("helo"))
except Exception as e:
    print(e)

OR

You can install it using the command pip install DecoderBot!

About

A lightweight Python chatbot that responds to messages using exact or close matches with `difflib`.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages