Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
Rewrite Octavia using MeowyMod code
Browse files Browse the repository at this point in the history
^
  • Loading branch information
Mike J. Renaker / "MikeDEV committed Feb 28, 2023
1 parent 9885dcf commit 29f70d5
Show file tree
Hide file tree
Showing 65 changed files with 1,885 additions and 2,515 deletions.
171 changes: 168 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,168 @@
__pycache__
.vscode
*.zip
# PyCharm
.idea

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/*
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# replit

*replit*
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Mike J. Renaker "MikeDEV"
Copyright (c) 2023 Mike J. Renaker / "MikeDEV"

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
77 changes: 43 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,49 @@
# Octavia
The not-so-friendly chatbot, a Meower port of Octavia! from Scratch.
Source code for the not-so-friendly chatbot, "Octavia". A fork of the "MeowyMod" bot, inspired by the [Octavia chat bot on Scratch.](https://scratch.mit.edu/projects/402821371/)

> **Warning**
> **Note**
>
> Octavia will not work on the current Meower server as Meower has not been upgraded to use Cloudlink 4.
## Chat with Octavia
Simply @Octavia in Meower's home page and Octavia will respond!
> Octavia is being rewritten.
<!-- TODO: Rewrite this
# 💡 Features 💡
### 👨‍💻 Friendly commands
Simply @MeowyMod in Meower to utilize the bot. Commands are listed below, or can be accessed by using `@MeowyMod help`.
### 🪶 Fast and lightweight
MeowyMod can run on minimal resources. At least 32MB of RAM and any reasonably capable CPU can run MeowyMod.
### 📃 Feature-Rich
* Ability to update
* Ability to self-restart
* Create announcements and warnings
* User promotion/demotion
* Supports account kicks/bans/pardons, as well as IP bans/pardons.
* Ticket logging
* Announcements
* **Missing features:** Reports management
> **Note**
>
> You can say hello to Octavia's [original incarnation](https://scratch.mit.edu/projects/402821371/) on Scratch.
## Making your own responses
If Octavia doesn't know how to respond to a question, she will ask you to input a response or you can tell Octavia "nevermind". You can add any kind of message response. There are some extra features you can add to a response.

> Hello, [username]!
Adding "[username]" to a response will add the origin username.

> I have stored [size] responses in my brain!
Adding [size] will return the total count of all responses in TinyDB.

## Setup
Before creating your own bot using Octavia's source code, you will need to create an account dedicated to your bot. Simply create an account from any Meower client and store the username and password of the bot in main.py.

Before you use your bot, you must install dependencies. This bot is bundled with Cloudlink 4.
`python3 -m pip install -r requirements.txt`

To run your bot, simply use
`python3 main.py`
and Octavia will connect to Meower and start listening for requests.

## Future improvements
* ~~Add a real natural-language AI~~ Outside of scope of original project idea.
* ~~Add options to use different databases other than TinyDB~~ Will likely use MontyDB in the future.
* Add feature to allow talking to Octavia in Meower chats/DMs.
* Add per-message custom PFPs to show Octavia's expressions. *(Will not be implemented until Meower Release 1)*
> main.py can be updated using the `@MeowyBot update` command, but the MeowerBot library will require manual updates.
# 📦 Dependencies 📦
* 🐍 Python >=3.11
* 🤖 MeowerBot.py >=2.4.5 (Built-in)
* 🗂️ PyMongo
* 🗄 dotenv
* 🌐 CloudLink 3 Client (Component of MeowerBot.py)
# ⌨ Commands ⌨
* `@MeowyMod help` - Displays a list of commands.
* `@MeowyMod meow` - MeowyMod will Meow, because it is indeed a Cat.
* `@MeowyMod update` - Checks and applies new updates to the bot.
* `@MeowyMod kick (username)` - Disconnects a user from Meower.
* `@MeowyMod ban (username)` - Bans a user from Meower.
* `@MeowyMod pardon (username)` - Pardons a ban for a user on Meower.
* `@MeowyMod ipban (username)` - Blocks the IP address of a user on Meower.
* `@MeowyMod ippardon (username)` - Pardons blocked IP addresses for a user on Meower.
* `@MeowyMod announce (announcement)` - Creates a Meower-wide announcement.
* `@MeowyMod warn (username) (message)` - Sends a warning message to a user's inbox on Meower.
* `@MeowyMod setlevel (username) (userlevel 0-4)` - Sets the user's security level.
* `@MeowyMod getlevel (username)` - Gets the user's security level, and explains the user's permissions. --!>
109 changes: 0 additions & 109 deletions client-example.py

This file was deleted.

1 change: 0 additions & 1 deletion cloudlink/__init__.py

This file was deleted.

16 changes: 0 additions & 16 deletions cloudlink/__main__.py

This file was deleted.

1 change: 0 additions & 1 deletion cloudlink/client/__init__.py

This file was deleted.

Loading

0 comments on commit 29f70d5

Please sign in to comment.