Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5 appunti foss #16

Merged
merged 4 commits into from
Oct 15, 2023
Merged

5 appunti foss #16

merged 4 commits into from
Oct 15, 2023

Conversation

lory9894
Copy link
Contributor

improves #5, don't close the issue or remove the branch, the regex will probably need updates

@lory9894 lory9894 added the enhancement New feature or request label Oct 15, 2023
@stefa168 stefa168 marked this pull request as draft October 15, 2023 21:18
@stefa168 stefa168 marked this pull request as ready for review October 15, 2023 22:38
@@ -326,6 +333,7 @@ def main(api_key: str) -> None:
application.add_handler(CommandHandler(["start"], command_start))
application.add_handler(CommandHandler(["rappresentanti", "rapp"], command_rappresentanti))
application.add_handler(CommandHandler(["activate"], command_activate))
application.add_handler(MessageHandler(filters.Regex("(vendo|cerco|compro|avete|qualcuno.*ha|Vendo|Cerco|Compro|Avete|Qualcuno.*ha).*appunti.*"),reply_repo_appunti)) #may be too generic
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sono d'accordo, ma per ora vediamo come va! 😄

@@ -238,6 +238,15 @@ def user_has_role(user: User, accepted_roles: list[str]) -> bool:
return True


async def reply_repo_appunti(update: Update, context: ContextTypes.DEFAULT_TYPE):
await update.message.reply_html(f"Ciao {update.message.from_user.full_name}, puoi trovare molti appunti gratuiti "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forse aggiungerei una menzione completa come facciamo in altre parti del codice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non mi è chiarissimo cosa intendi con "menzione completa"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giusto, non sono stato preciso. Intendo una menzione non solo con il nome dell'utente, ma anche il fatto che la tagghi; guarda ad esempio la risposta a /help

@stefa168 stefa168 merged commit 695608d into master Oct 15, 2023
@N-essuno N-essuno linked an issue Oct 17, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants