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

fix: remove templatev2 (useless) #76

Merged
merged 5 commits into from
Mar 7, 2023
Merged

fix: remove templatev2 (useless) #76

merged 5 commits into from
Mar 7, 2023

Conversation

filipporomani
Copy link
Contributor

Please refer to issue #73.

Missing language information.
@filipporomani
Copy link
Contributor Author

Fixed issues #73 & #69.

@Kalebu
Copy link
Contributor

Kalebu commented Mar 6, 2023

Hi @filipporomani

Thank you for contributing

You're not supposed to completely remove send_template_v2, we want to add a deprecation warning first and then have a version to remove it completely as some people already use it.

@filipporomani
Copy link
Contributor Author

ooook, i'll go ahead and fix this.

the send_templatev2() method is being deprecated.
@filipporomani
Copy link
Contributor Author

Should be fine now

Copy link
Contributor

@Kalebu Kalebu left a comment

Choose a reason for hiding this comment

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

You need to add the warning within the heyoo send_templatev2 method more of something like this

import warnings
from colorama import Fore, Style

def send_templatev2(self, template, recipient_id, components, lang: str = "en_US"):
    message = f"{Fore.RED}The 'send_templatev2' method is deprecated and will be removed in the future. Please use 'send_template' instead.{Style.RESET_ALL}"
    warnings.warn(message, DeprecationWarning)
    return send_template(template, recipient_id, components, lang=lang)

Copy link
Contributor Author

@filipporomani filipporomani left a comment

Choose a reason for hiding this comment

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

Pushed requested changes

@Kalebu Kalebu merged commit f6882c2 into Neurotech-HQ:main Mar 7, 2023
@filipporomani filipporomani deleted the patch-4 branch March 19, 2023 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants