joybiswas007 / node-midjourney-telegram-bot

A Telegram bot created in Node.js using the unofficial Midjourney Node.js client.
MIT License
5 stars 2 forks source link

Enchantment - /sudo /rm /ls #5

Closed chelaxian closed 6 months ago

chelaxian commented 6 months ago

some ideas to improve functionality of this commands:

  1. /sudo - allows duplicate adding of same user twice or more times - should check if it is added already
  2. /ls - should show not only summary number of members but also list all users something like that:
Total 4 users in sudoers:
1. tg://user?id=123456
2. tg://user?id=654321
3. tg://user?id=555555
4. tg://user?id=010101

this will allow admin to open telegram user profile and check who is who of sudo users, and than copy-paste ID to /rm any of them

  1. /sudo - should also allow all users in group chat to interact whit bot if you /sudo "group_id". now it works only for group admins if they use anonymity when type messeges not from themselfs but from its group name. It should allow all users in group to interact with bot without /sudo for all of them individualy.

thanks!

joybiswas007 commented 6 months ago

some ideas to improve functionality of this commands:

  1. /sudo - allows duplicate adding of same user twice or more times - should check if it is added already
  2. /ls - should show not only summary number of members but also list all users something like that:
Total 4 users in sudoers:
1. tg://user?id=123456
2. tg://user?id=654321
3. tg://user?id=555555
4. tg://user?id=010101

this will allow admin to open telegram user profile and check who is who of sudo users, and than copy-paste ID to /rm any of them

  1. /sudo - should also allow all users in group chat to interact whit bot if you /sudo "group_id". now it works only for group admins if they use anonymity when type messeges not from themselfs but from its group name. It should allow all users in group to interact with bot without /sudo for all of them individualy.

thanks!

Fixed all of these issues. Kindly check again and let me know. And again thanks a lot for the feedback. :+1:

chelaxian commented 6 months ago

thanks again for developing this project! i wish i can contribute but i don't know JS, my only known PL is python.

Bth,

  1. not work, /sudo still allow to add duplicate records but it is not critical
  2. works
  3. works
joybiswas007 commented 6 months ago

thanks again for developing this project! i wish i can contribute but i don't know JS, my only known PL is python.

Bth,

  1. not work, /sudo still allow to add duplicate records but it is not critical
  2. works
  3. works

It's ok. And about the sudo command actually I made changes to db codes like all saved values will be unique. Maybe your db didn't get updated according the codes. Can you try changing the db name and see if that works or not. Lemme know what happens.

chelaxian commented 6 months ago

thanks again for developing this project! i wish i can contribute but i don't know JS, my only known PL is python. Bth,

  1. not work, /sudo still allow to add duplicate records but it is not critical
  2. works
  3. works

It's ok. And about the sudo command actually I made changes to db codes like all saved values will be unique. Maybe your db didn't get updated according the codes. Can you try changing the db name and see if that works or not. Lemme know what happens.

when creating new DB - /sudo not allow duplicate, thanks