From: Muhammad Rizki <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Muhammad Rizki <[email protected]>,
GNU/Weeb Mailing List <[email protected]>,
Alviro Iskandar Setiawan <[email protected]>
Subject: [PATCH v1 0/4] Add admin configuration
Date: Thu, 11 Aug 2022 15:26:52 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
Afternoon sir,
In this series, I create config.py for handling the bot commands and
callbacks which is only admins who can use these.
How to configure it?
1. Search any of Telegram bot who has User ID extractor
2. Copy your User ID
3. Then, paste it in the ADMINS list variable in config.py file
There are 4 patches in this series:
- Patch 1 is to add config.py.example so other devs know what to do
- Patch 2 is to add config.py into the .gitignore
- Patch 3 is to use config.admin_only into the commands and callbacks
- Patch 4 is just remove some unused codes.
Tested and works as I expected, please give it a test too if there is
any errors, bugs, or unexpected results.
Signed-off-by: Muhammad Rizki <[email protected]>
---
Muhammad Rizki (4):
Add config.py.example
Add config.py in .gitignore
Use created filter for admin-only
Remove unused codes in some files
.gitignore | 3 +++
daemon/config.py.example | 11 +++++++++++
daemon/packages/plugins/callbacks/del_atom.py | 3 ++-
daemon/packages/plugins/callbacks/del_chat.py | 3 ++-
daemon/packages/plugins/commands/debugger.py | 4 +++-
daemon/packages/plugins/commands/manage_atom.py | 8 +++++---
daemon/packages/plugins/commands/manage_broadcast.py | 5 +++--
daemon/packages/plugins/commands/scrape.py | 3 ++-
daemon/scraper/db.py | 1 -
9 files changed, 31 insertions(+), 10 deletions(-)
create mode 100644 daemon/config.py.example
base-commit: a6280937ce9623e961bb66a76fad2c2f5cd10244
--
Muhammad Rizki
next reply other threads:[~2022-08-11 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 8:26 Muhammad Rizki [this message]
2022-08-11 8:26 ` [PATCH v1 1/4] Add config.py.example Muhammad Rizki
2022-08-11 8:26 ` [PATCH v1 2/4] Add config.py in .gitignore Muhammad Rizki
2022-08-11 8:26 ` [PATCH v1 3/4] Use created filter for admin-only Muhammad Rizki
2022-08-11 8:26 ` [PATCH v1 4/4] Remove unused codes in some files Muhammad Rizki
2022-08-11 22:29 ` [PATCH v1 0/4] Add admin configuration Ammar Faizi
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