From: Muhammad Rizki <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Muhammad Rizki <[email protected]>,
Alviro Iskandar Setiawan <[email protected]>,
GNU/Weeb Mailing List <[email protected]>
Subject: [RFC PATCH v5 06/18] telegram: Renames in telegram mailer directory
Date: Mon, 26 Sep 2022 04:14:15 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
Rename a mailer directory and listener file.
Directory:
- telegram/scraper => telegram/mailer
File:
- telegram/scraper/bot.py => telegram/mailer/listener.py
While renaming them, adapt the import statement to avoid errors.
Signed-off-by: Muhammad Rizki <[email protected]>
---
daemon/telegram/{scraper => mailer}/__init__.py | 4 ++--
daemon/telegram/{scraper/bot.py => mailer/listener.py} | 2 +-
daemon/telegram/{scraper => mailer}/scraper.py | 0
daemon/telegram/{scraper => mailer}/utils.py | 0
daemon/telegram/packages/client.py | 2 +-
daemon/telegram/packages/plugins/callbacks/del_atom.py | 2 +-
daemon/telegram/packages/plugins/callbacks/del_chat.py | 2 +-
daemon/telegram/packages/plugins/commands/manage_atom.py | 2 +-
daemon/telegram/packages/plugins/commands/manage_broadcast.py | 2 +-
daemon/telegram/packages/plugins/commands/scrape.py | 4 ++--
10 files changed, 10 insertions(+), 10 deletions(-)
rename daemon/telegram/{scraper => mailer}/__init__.py (77%)
rename daemon/telegram/{scraper/bot.py => mailer/listener.py} (98%)
rename daemon/telegram/{scraper => mailer}/scraper.py (100%)
rename daemon/telegram/{scraper => mailer}/utils.py (100%)
diff --git a/daemon/telegram/scraper/__init__.py b/daemon/telegram/mailer/__init__.py
similarity index 77%
rename from daemon/telegram/scraper/__init__.py
rename to daemon/telegram/mailer/__init__.py
index 4294302..75f27df 100644
--- a/daemon/telegram/scraper/__init__.py
+++ b/daemon/telegram/mailer/__init__.py
@@ -5,5 +5,5 @@
#
from .scraper import Scraper
-from .bot import BotMutexes
-from .bot import Bot
+from .listener import BotMutexes
+from .listener import Bot
diff --git a/daemon/telegram/scraper/bot.py b/daemon/telegram/mailer/listener.py
similarity index 98%
rename from daemon/telegram/scraper/bot.py
rename to daemon/telegram/mailer/listener.py
index ac183be..f92ae1d 100644
--- a/daemon/telegram/scraper/bot.py
+++ b/daemon/telegram/mailer/listener.py
@@ -7,7 +7,7 @@
from pyrogram.types import Message
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from telegram.packages import DaemonClient
-from telegram.scraper import Scraper
+from . import Scraper
from . import utils
import asyncio
import shutil
diff --git a/daemon/telegram/scraper/scraper.py b/daemon/telegram/mailer/scraper.py
similarity index 100%
rename from daemon/telegram/scraper/scraper.py
rename to daemon/telegram/mailer/scraper.py
diff --git a/daemon/telegram/scraper/utils.py b/daemon/telegram/mailer/utils.py
similarity index 100%
rename from daemon/telegram/scraper/utils.py
rename to daemon/telegram/mailer/utils.py
diff --git a/daemon/telegram/packages/client.py b/daemon/telegram/packages/client.py
index e419d40..950665b 100644
--- a/daemon/telegram/packages/client.py
+++ b/daemon/telegram/packages/client.py
@@ -8,7 +8,7 @@ from pyrogram.enums import ParseMode
from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton
from typing import Union
from email.message import Message
-from telegram.scraper import utils
+from telegram.mailer import utils
from telegram.database import DB
from .decorator import handle_flood
diff --git a/daemon/telegram/packages/plugins/callbacks/del_atom.py b/daemon/telegram/packages/plugins/callbacks/del_atom.py
index 94b2489..57be8c6 100644
--- a/daemon/telegram/packages/plugins/callbacks/del_atom.py
+++ b/daemon/telegram/packages/plugins/callbacks/del_atom.py
@@ -4,7 +4,7 @@
#
from telegram.packages import DaemonClient
-from telegram.scraper import utils
+from telegram.mailer import utils
from pyrogram.types import CallbackQuery
from telegram import config
diff --git a/daemon/telegram/packages/plugins/callbacks/del_chat.py b/daemon/telegram/packages/plugins/callbacks/del_chat.py
index ae21179..854b172 100644
--- a/daemon/telegram/packages/plugins/callbacks/del_chat.py
+++ b/daemon/telegram/packages/plugins/callbacks/del_chat.py
@@ -4,7 +4,7 @@
#
from telegram.packages import DaemonClient
-from telegram.scraper import utils
+from telegram.mailer import utils
from pyrogram.types import CallbackQuery
from telegram import config
diff --git a/daemon/telegram/packages/plugins/commands/manage_atom.py b/daemon/telegram/packages/plugins/commands/manage_atom.py
index a4ccc46..37b06cb 100644
--- a/daemon/telegram/packages/plugins/commands/manage_atom.py
+++ b/daemon/telegram/packages/plugins/commands/manage_atom.py
@@ -6,7 +6,7 @@
from pyrogram.types import Message
from pyrogram import filters
from telegram.packages import DaemonClient
-from telegram.scraper import utils
+from telegram.mailer import utils
from telegram import config
diff --git a/daemon/telegram/packages/plugins/commands/manage_broadcast.py b/daemon/telegram/packages/plugins/commands/manage_broadcast.py
index 16a494a..b99b712 100644
--- a/daemon/telegram/packages/plugins/commands/manage_broadcast.py
+++ b/daemon/telegram/packages/plugins/commands/manage_broadcast.py
@@ -6,7 +6,7 @@
from pyrogram.types import Message
from pyrogram import filters, enums
from telegram.packages import DaemonClient
-from telegram.scraper import utils
+from telegram.mailer import utils
from telegram import config
diff --git a/daemon/telegram/packages/plugins/commands/scrape.py b/daemon/telegram/packages/plugins/commands/scrape.py
index a83420c..253993f 100644
--- a/daemon/telegram/packages/plugins/commands/scrape.py
+++ b/daemon/telegram/packages/plugins/commands/scrape.py
@@ -7,8 +7,8 @@
from pyrogram.types import Message
from pyrogram import filters
from telegram.packages import DaemonClient
-from telegram.scraper import Scraper
-from telegram.scraper import utils
+from telegram.mailer import Scraper
+from telegram.mailer import utils
from telegram import config
import shutil
import re
--
Muhammad Rizki
next prev parent reply other threads:[~2022-09-25 21:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-25 21:14 [RFC PATCH v5 00/18] Refactor Telegram & initial work Discord Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 01/18] telegram: Move the Telegram bot source code Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 02/18] telegram: Refactor the Telegram bot database method Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 03/18] telegram: Rename some functions in scraper/bot.py Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 04/18] Add ignore file for .env Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 05/18] telegram: Refactor the Telegram bot Muhammad Rizki
2022-09-25 21:14 ` Muhammad Rizki [this message]
2022-09-25 21:14 ` [RFC PATCH v5 07/18] Move scraper and utility file Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 08/18] discord: Initial work for the Discord bot Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 09/18] discord: Add success run notice on_ready event Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 10/18] discord: Add error handler on events Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 11/18] Move db.sql to combine the database with Discord and Telegram Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 12/18] discord: Add database tables for the Discord bot Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 13/18] discord: Add initial Discord bot database instance Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 14/18] discord: Add save_atom() in database insertion Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 15/18] discord: Add save_broadcast() " Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 16/18] discord: Add save_discord_mail() " Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 17/18] discord: Add save_email() " Muhammad Rizki
2022-09-25 21:14 ` [RFC PATCH v5 18/18] discord: Add $sync basic command Muhammad Rizki
2022-09-25 21:31 ` [RFC PATCH v5 00/18] Refactor Telegram & initial work Discord Ammar Faizi
2022-09-25 21:37 ` Muhammad Rizki
2022-09-25 21:48 ` Ammar Faizi
2022-09-25 21:52 ` Muhammad Rizki
2022-09-25 21:58 ` Ammar Faizi
2022-09-30 12:21 ` Ammar Faizi
2022-09-30 13:39 ` Muhammad Rizki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox