Coder Social home page Coder Social logo

amino-bot's Introduction

amino-bot

Бот для мониторинга чатов амино. В дальнейшем планируется расширение функционала.

Установка

Для корректной работы установите себе на компьютер git (https://git-scm.com/downloads)

Для успешной установки вам необходима версия Python 3.7+

  1. Клонировать репозиторий
  2. Перейти в папку с проектом и открыть консоль
  3. Установить зависимости python -m pip install -r requirements.txt
  4. Запустить бота python main.py

Настройка

Вы можете настроить сообщение при нарушении в файле warning.txt

При запуске скрипта автоматически проверяется наличие обновлений

Настроить автообновление вы можете в файле config.py

Буду очень благодарен, если вы будете предлагать какие-то доработки во владке Issues

Телеграм бот

Есть возможность логирования в телеграм

Чтобы использовать эту функцию вам необходимо настроить соответсвующие переменные в файле config.py

После этого запустите скрипт для настройки бота python config_bot.py

Скрипт нужно запускать только один раз чтобы бот знал куда отправлять логи


P.S. Некоторую часть кода повзаимстовал у gastrodon

amino-bot's People

Contributors

dependabot[bot] avatar serhiimandrykin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amino-bot's Issues

Help me!

An error occurs when installing dependencies:

_Building wheels for collected packages: greenlet
Building wheel for greenlet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /data/data/com.termux/files/usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-dtlf_bd5/greenlet/setup.py'"'"'; file='"'"'/data/data/com.termux/files/usr/tmp/pip-install-dtlf_bd5/greenlet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /data/data/com.termux/files/usr/tmp/pip-wheel-ugl0ai3o
cwd: /data/data/com.termux/files/usr/tmp/pip-install-dtlf_bd5/greenlet/
Complete output (30 lines):
running bdist_wheel
running build
running build_ext
building 'greenlet' extension
creating build
creating build/temp.linux-aarch64-3.9
aarch64-linux-android-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -I/data/data/com.termux/files/usr/include/python3.9 -c greenlet.c -o build/temp.linux-aarch64-3.9/greenlet.o
In file included from greenlet.c:343:
In file included from ./slp_platformselect.h:47:
./platform/switch_aarch64_gcc.h:62:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
asm volatile ("mov %0, #0" : "=r" (err));
^
./platform/switch_aarch64_gcc.h:62:35: note: use constraint modifier "w"
asm volatile ("mov %0, #0" : "=r" (err));
^~
%w0
greenlet.c:823:13: warning: 'PyEval_CallObjectWithKeywords' is deprecated [-Wdeprecated-declarations]
result = PyEval_CallObjectWithKeywords(
^
/data/data/com.termux/files/usr/include/python3.9/ceval.h:17:1: note: 'PyEval_CallObjectWithKeywords' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
^
/data/data/com.termux/files/usr/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
greenlet.c:1046:4: error: use of undeclared identifier '_Py_DEC_REFTOTAL'
_Py_DEC_REFTOTAL;
^
2 warnings and 1 error generated.
error: command '/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang' failed with exit code 1

ERROR: Failed building wheel for greenlet
Running setup.py clean for greenlet
Failed to build greenlet
Installing collected packages: greenlet, gevent, smmap, gitdb, GitPython, idna, urllib3, requests, six, pyTelegramBotAPI, websocket
Attempting uninstall: greenlet
Found existing installation: greenlet 0.4.17
Uninstalling greenlet-0.4.17:
Successfully uninstalled greenlet-0.4.17
Running setup.py install for greenlet ... error
ERROR: Command errored out with exit status 1:
command: /data/data/com.termux/files/usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-dtlf_bd5/greenlet/setup.py'"'"'; file='"'"'/data/data/com.termux/files/usr/tmp/pip-install-dtlf_bd5/greenlet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-xo0506t1/install-record.txt --single-version-externally-managed --compile --install-headers /data/data/com.termux/files/usr/include/python3.9/greenlet
cwd: /data/data/com.termux/files/usr/tmp/pip-install-dtlf_bd5/greenlet/
Complete output (30 lines):
running install
running build
running build_ext
building 'greenlet' extension
creating build
creating build/temp.linux-aarch64-3.9
aarch64-linux-android-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -I/data/data/com.termux/files/usr/include/python3.9 -c greenlet.c -o build/temp.linux-aarch64-3.9/greenlet.o
In file included from greenlet.c:343:
In file included from ./slp_platformselect.h:47:
./platform/switch_aarch64_gcc.h:62:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
asm volatile ("mov %0, #0" : "=r" (err));
^
./platform/switch_aarch64_gcc.h:62:35: note: use constraint modifier "w"
asm volatile ("mov %0, #0" : "=r" (err));
^~
%w0
greenlet.c:823:13: warning: 'PyEval_CallObjectWithKeywords' is deprecated [-Wdeprecated-declarations]
result = PyEval_CallObjectWithKeywords(
^
/data/data/com.termux/files/usr/include/python3.9/ceval.h:17:1: note: 'PyEval_CallObjectWithKeywords' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
^
/data/data/com.termux/files/usr/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
greenlet.c:1046:4: error: use of undeclared identifier '_Py_DEC_REFTOTAL'
Py_DEC_REFTOTAL;
^
2 warnings and 1 error generated.
error: command '/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang' failed with exit code 1
----------------------------------------
Rolling back uninstall of greenlet
Moving to /data/data/com.termux/files/usr/include/python3.9/greenlet/
from /data/data/com.termux/files/usr/include/python3.9/~reenlet
Moving to /data/data/com.termux/files/usr/lib/python3.9/site-packages/greenlet-0.4.17.dist-info/
from /data/data/com.termux/files/usr/lib/python3.9/site-packages/~reenlet-0.4.17.dist-info
Moving to /data/data/com.termux/files/usr/lib/python3.9/site-packages/greenlet.cpython-39.so
from /data/data/com.termux/files/usr/tmp/pip-uninstall-1n65nbs4/greenlet.cpython-39.so
ERROR: Command errored out with exit status 1: /data/data/com.termux/files/usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-dtlf_bd5/greenlet/setup.py'"'"'; file='"'"'/data/data/com.termux/files/usr/tmp/pip-install-dtlf_bd5/greenlet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-xo0506t1/install-record.txt --single-version-externally-managed --compile --install-headers /data/data/com.termux/files/usr/include/python3.9/greenlet Check the logs for full command output.

Новые функции

Сообственно, предложения таковы:

  1. Результат работы бота (а именно нарушения) - выводить не в консоль, а в чат (амино или телеграмм) для более простой работы команды администраторов.
    Это из реальных. Из тех, что звучат фантастически:
  2. Сделать счётчик нарушений каждого пользователя. После определенного количества нарушений - кик.

Бот не видит мат в некоторых случаях.

Бот нормально работает если:

  1. сообщение состоит только из мата (пример. "блять").
  2. если сообщение начинается с мата (пример. "блять ты").
    Но не работает если мат находится после слов (пример, "ты блять").

Новые функции.

  1. Желательно, чтоб бот парсил ссылочку на участника. И выводил в результат не только ник, но и ссылку.
  2. Кроме того. можно чтоб бот кидал ссылку и на чат, в котором произошло нарушение.

Abuse

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.