2018-02-13 04:28:26 +00:00
# Modufur
2022-02-21 10:51:13 +00:00
An experimental [Hikari ](https://www.hikari-py.dev ) Discord bot for reverse image searching using [SauceNAO ](https://saucenao.com ) & [Kheina ](https://kheina.com ).
2022-02-22 19:02:47 +00:00
## Optional
A Unix-based operating system is used for the following commands.\
[WSL ](https://docs.microsoft.com/en-us/windows/wsl ) can be used to run Linux on Windows, but is not required.
2022-02-21 07:10:57 +00:00
## Requirements
2022-02-22 19:02:47 +00:00
[Git ](https://git-scm.com/downloads )\
2022-02-21 07:10:57 +00:00
[Python ](https://www.python.org ) 3.10+\
[Poetry ](https://python-poetry.org )
2022-02-21 10:51:13 +00:00
## Installing
2022-02-22 19:02:47 +00:00
Clone this repository
2022-02-21 07:10:57 +00:00
```
2022-02-22 19:02:47 +00:00
git clone https://github.com/Myned/Modufur.git
2022-02-21 07:10:57 +00:00
```
2022-02-22 19:02:47 +00:00
Go to the project folder
2022-02-21 07:10:57 +00:00
```
cd Modufur
```
2022-02-22 19:02:47 +00:00
Create a virtual environment and install dependencies
2022-02-21 07:10:57 +00:00
```
2022-02-22 19:02:47 +00:00
poetry install
2022-02-21 07:10:57 +00:00
```
## Usage
2022-02-22 19:02:47 +00:00
Go to the project folder
```
cd Modufur
```
Run with optimizations
2022-02-21 07:10:57 +00:00
```
2022-02-21 20:53:10 +00:00
poetry run python -00 run.py
2022-02-21 07:10:57 +00:00
```
2022-02-21 10:51:13 +00:00
## Setup
2022-02-22 19:02:47 +00:00
Run to create `config.toml` \
The file will automatically generate if it does not exist
2022-02-21 07:10:57 +00:00
```
guilds = [] # guild IDs to register commands, empty for global
client = 0 # bot application ID
token = "" # bot token
activity = "" # bot status
saucenao = "" # saucenao token
e621 = "" # e621 token
```
2022-02-21 10:51:13 +00:00
## Updating
2022-02-22 19:02:47 +00:00
Go to the project folder
2022-02-21 10:51:13 +00:00
```
cd Modufur
```
2022-02-22 19:02:47 +00:00
Pull changes from the repository
2022-02-21 10:51:13 +00:00
```
git pull
```
2022-02-22 19:02:47 +00:00
Remove the virtual environment folder (necessary because of git dependencies)
2022-02-21 10:51:13 +00:00
```
2022-02-22 19:02:47 +00:00
rm -rf .venv
2022-02-21 10:51:13 +00:00
```
2022-02-22 19:02:47 +00:00
Reinstall and update the virtual environment
2022-02-21 10:51:13 +00:00
```
poetry update
```
2022-02-22 19:02:47 +00:00
## Uninstalling
Remove the project folder
2022-02-21 20:53:10 +00:00
```
2022-02-22 19:02:47 +00:00
rm -rf Modufur
2022-02-21 20:53:10 +00:00
```
2022-02-22 19:02:47 +00:00
## Contributing
1. [Fork ](https://docs.github.com/en/get-started/quickstart/fork-a-repo ) this repository on GitHub
2. Make changes to the code
3. In the project folder, run `poetry run python black .`
4. Create a [pull request ](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request ) from the fork
## FAQ
### What happened to the public bot?
My Discord account was deleted, so a new bot had to be created.
### Why not link to the bot here?
Although public, I do not wish for it to be excessively used due to API quotas.
2022-02-21 07:10:57 +00:00
## Credits
[hikari ](https://github.com/hikari-py/hikari )\
[hikari-lightbulb ](https://github.com/tandemdude/hikari-lightbulb )\
[hikari-miru ](https://github.com/HyperGH/hikari-miru )\
[pysaucenao ](https://github.com/FujiMakoto/pysaucenao )