-
Notifications
You must be signed in to change notification settings - Fork 1
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
5 appunti foss #16
Conversation
@@ -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 |
There was a problem hiding this comment.
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 " |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
improves #5, don't close the issue or remove the branch, the regex will probably need updates