public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v1 0/4] Add admin configuration
@ 2022-08-11  8:26 Muhammad Rizki
  2022-08-11  8:26 ` [PATCH v1 1/4] Add config.py.example Muhammad Rizki
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Muhammad Rizki @ 2022-08-11  8:26 UTC (permalink / raw)
  To: Ammar Faizi
  Cc: Muhammad Rizki, GNU/Weeb Mailing List, Alviro Iskandar Setiawan

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-11 22:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11  8:26 [PATCH v1 0/4] Add admin configuration Muhammad Rizki
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox