Skip to content

Commit

Permalink
chore: fix template track (#145)
Browse files Browse the repository at this point in the history
* chore: update user info env

* chore: fix template track
  • Loading branch information
erfjab authored Jan 10, 2025
1 parent 03df31a commit b9a60a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ TELEGRAM_ADMINS_ID=[123456789 , 987654321]
## Use HTML tags: <b>text</b> for bold text, <code>text</code> for monospace text
## Available variables: username, data_limit, expire_strategy, subscription_url
## For more variables, see: github.com/erfjab/holderbot/blob/master/app/api/types/marzneshin/user.py#L155
USER_INFO="""
• <b>Username:</b> <code>{username}</code>
• <b>Data Limit:</b> <code>{data_limit}</code>
• <b>Date Limit:</b> <code>{expire_strategy}</code>
• <b>Sub Url:</b> <code>{subscription_url}</code>
"""
USER_INFO="• <b>Username:</b> <code>{username}</code>\n• <b>Data Limit:</b> <code>{data_limit}</code>\n• <b>Date Limit:</b> <code>{expire_strategy}</code>\n• <b>Sub Url:</b> <code>{subscription_url}</code>"
3 changes: 2 additions & 1 deletion app/routers/users/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def usercount(message: Message, state: FSMContext):
templates = await crud.get_templates(active=True)
if templates:
await state.set_state(UserCreateForm.TEMPLATE)
return await message.answer(
track = await message.answer(
text=MessageTexts.ITEMS,
reply_markup=BotKeys.selector(
data=[tem.button_remark for tem in templates] + ["CUSTOM"],
Expand All @@ -113,6 +113,7 @@ async def usercount(message: Message, state: FSMContext):
width=1,
),
)
return await tracker.cleardelete(message, track)
await state.set_state(UserCreateForm.DATA_LIMIT)
text = MessageTexts.ASK_DATA_LIMT
else:
Expand Down

0 comments on commit b9a60a5

Please sign in to comment.