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

[FEATURE] Extensions of Defaults #1797

Closed
Bibo-Joshi opened this issue Feb 27, 2020 · 3 comments
Closed

[FEATURE] Extensions of Defaults #1797

Bibo-Joshi opened this issue Feb 27, 2020 · 3 comments

Comments

@Bibo-Joshi
Copy link
Member

Bibo-Joshi commented Feb 27, 2020

Possible candidates to add to the Defaults concept:

tzinfo

We should use Defauts.tzinfo as default instead of UTC … That would mean:

  • When a job is created without setting tzinfo explicitly, use Defaults.tzinfo
  • When calling JobQueue._put() with a naive when, use when.replace(tzinfo=defaults.tzinfo)
    This would basically not change the current set up, but just put it under the hood
  • Probably Message.date and all the friends should also use defaults.tzinfo, so basically every datetime instance occuring in the lib.

Arguments of Filters

How to make it work: We would need to override those attributes on dispatcher.add_handler somehow. that's pretty much the only time, the filters and the dispatcher can see each other …

Dice.emoji

  • Only relevant after Api 4.8 #1917. Also discussable, if this really is a good idea, as the emoji attribute of Dice is positional and not optional

ReplyKeyboardMarkup

  • resize_keyboard
  • one_time_keyboard

Redesign of default_quote

Right now, default_quote get's passed from getting updates through all objects, whose attributes have a Message attribute and is set as attribute in Message. But as the Message.reply_* methods only work with a bot anyway, we could just access Message.bot.defaults.default_quote.

See #1965

@Bibo-Joshi Bibo-Joshi changed the title [FEATURE] Default tzinfo [FEATURE] Enhancement of Defaults May 1, 2020
@Bibo-Joshi Bibo-Joshi changed the title [FEATURE] Enhancement of Defaults [FEATURE] Extensions of Defaults May 1, 2020
@Bibo-Joshi
Copy link
Member Author

closed by #2042 and #1965

(We decided that additional things should probably only be added to defaults only, when users actually request it …)

@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2020
@JosXa
Copy link
Contributor

JosXa commented Oct 2, 2020

Filters.command: allow commands anywhere in the text or not

what the heck? ^^

@Bibo-Joshi
Copy link
Member Author

Filters.command: allow commands anywhere in the text or not

what the heck? ^^

Read as: Add default setting for making Filters.command only filter for commands at the start of the message or anywhere in the message. The filter has a parameter for that since … 12.4?
But as stated above, the consensus in dev chat was to not add more defaults too quickly. See here and above

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants