6 Commits

Author SHA1 Message Date
AlberLC
e41338b5f6 Update workflows 2022-02-04 23:32:43 +01:00
AlberLC
47e371f270 Update README.rst 2022-02-02 01:46:16 +01:00
AlberLC
5746e99b3f Update README.rst 2022-02-02 01:43:17 +01:00
AlberLC
e1c14f7512 Update README.rst 2022-02-02 01:40:47 +01:00
AlberLC
503dfb4215 Update README.rst 2022-02-02 01:40:10 +01:00
AlberLC
a37c2ee1d7 Fix error message when inline weather 2022-01-31 06:22:02 +01:00
3 changed files with 30 additions and 8 deletions

View File

@@ -22,10 +22,10 @@ jobs:
- name: Update setup.cfg
run: |
sed -i "
s/{project_name}/${{ github.event.repository.name }}/g;
s/{project_version}/${{ github.ref_name }}/g;
s/{author}/${{ github.repository_owner }}/g;
s/{description}/${{ github.event.repository.description }}/g
s|{project_name}|${{ github.event.repository.name }}|g;
s|{project_version}|${{ github.ref_name }}|g;
s|{author}|${{ github.repository_owner }}|g;
s|{description}|${{ github.event.repository.description }}|g
" setup.cfg
- name: Build package

View File

@@ -3,7 +3,9 @@ FlanaBot
|license| |project_version| |python_version|
Flanagan's bot.
Bot based on `github.com/AlberLC/multibot`_ to manage Discord, Telegram and Twitch chats, moderate them and add functionalities.
|
Installation
------------
@@ -14,6 +16,22 @@ Python 3.10 or higher is required.
pip install flanabot
|
Features
--------
- Talks to users.
- Delete message batches.
- It works both in groups and in private chats.
- Understands numbers and amounts of time textually expressed (useful for deleting a message batch or saying "flanabot ban john for one hour and 20 minutes").
- Shows interactive via buttons charts of past, current and forecast weather.
- Change user roles temporarily or forever.
- Mute users temporarily or forever.
- Ban users temporarily or forever.
- Configurable default behavior for each chat, just talk to him to configure it.
- Get media from twitter, instagram and tiktok and send it to the chat. From tiktok also obtains data about the song that is playing in the video.
.. |license| image:: https://img.shields.io/github/license/AlberLC/flanabot?style=flat
:target: https://github.com/AlberLC/flanabot/blob/main/LICENSE
@@ -26,3 +44,5 @@ Python 3.10 or higher is required.
.. |python_version| image:: https://img.shields.io/pypi/pyversions/flanabot
:target: https://www.python.org/downloads/
:alt: PyPI - Python Version
.. _github.com/AlberLC/multibot: https://github.com/AlberLC/multibot

View File

@@ -583,14 +583,16 @@ class FlanaBot(MultiBot, ABC):
- flanautils.CommonWords.words
)
if not place_words:
await self.send_error(random.choice(('¿Tiempo dónde?', 'Indica el sitio.', 'Y el sitio?', 'y el sitio? me lo invento?')), message)
if not message.is_inline:
await self.send_error(random.choice(('¿Tiempo dónde?', 'Indica el sitio.', 'Y el sitio?', 'y el sitio? me lo invento?')), message)
return
if 'calle' in original_text_words:
place_words.insert(0, 'calle')
place_query = ' '.join(place_words)
if len(place_query) >= constants.MAX_PLACE_QUERY_LENGTH:
await self.send_error(Media('resources/mucho_texto.png'), message)
if not message.is_inline:
await self.send_error(Media('resources/mucho_texto.png'), message)
return
if show_progress_state:
bot_state_message = await self.send(f'Buscando "{place_query}" en el mapa 🧐...', message)