Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BX-Committees
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BX-Telegram
BX-Committees
Commits
73b68549
Commit
73b68549
authored
1 year ago
by
Charlielv04
Browse files
Options
Downloads
Patches
Plain Diff
Password in different message for easy copy
parent
17f8f03f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Committees/base.py
+4
-2
4 additions, 2 deletions
src/Committees/base.py
with
4 additions
and
2 deletions
src/Committees/base.py
+
4
−
2
View file @
73b68549
...
...
@@ -688,10 +688,12 @@ class Access_handler:
new_password
=
self
.
active_committee
+
'
:
'
+
''
.
join
(
random
.
choices
(
string
.
digits
+
string
.
ascii_letters
,
k
=
10
))
bx_utils
.
db
.
add_one_time_pass
(
new_password
,
self
.
active_committee
)
await
context
.
bot
.
send_message
(
chat_id
=
update
.
effective_chat
.
id
,
text
=
f
"
The password generated is <b>
{
new_password
}
</b>, the default rights are admin for new users
"
,
text
=
f
"
The password generated is:
"
)
await
context
.
bot
.
send_message
(
chat_id
=
update
.
effective_chat
.
id
,
text
=
"
<b>{new_password}</b>
"
,
parse_mode
=
ParseMode
.
HTML
)
await
context
.
bot
.
send_message
(
chat_id
=
update
.
effective_chat
.
id
,
text
=
f
"
This password only has one use, send it to the person you want to give access
"
)
text
=
f
"
This password only has one use, send it to the person you want to give access
, the default rights are admin for new users
"
)
return
self
.
state
.
HUB
async
def
rights
(
self
,
update
:
Update
,
context
:
ContextTypes
.
DEFAULT_TYPE
):
self
.
right_changer
=
Right_changer
(
self
.
admins_rights
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment