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

Add command to enable/disable specific embeds #33

Merged
merged 8 commits into from
Jul 31, 2023
Merged

Add command to enable/disable specific embeds #33

merged 8 commits into from
Jul 31, 2023

Conversation

zzkW35
Copy link
Collaborator

@zzkW35 zzkW35 commented Feb 16, 2023

  • The new command "/embed" allows users/groups to enable/disable embeds of specific websites, among the supported ones.

  • The syntax is "embed website on/off".

  • This new feature was made possible using Redis, where the bot stores the unique chat ID and its respective preferences.

  • By default all the values are set to "1", which means that all the supported websites are filtered.

  • The bot also creates a "local" dictionary containing a copy of the most recent data from Redis, so whenever the bot has to decide whether filtering a specific URL or not it doesn't need to query the database.

  • Whenever the user changes a filter the database is updated alongside the local dictionary.

* The new command "/embed" allows users/groups to enable/disable
embeds of specific websites, among the supported ones.

* The syntax is "embed website on/off".

* This new feature was made possible using Redis, where the bot stores the
unique chat ID and its respective preferences.
* By default all the values are set to "1", which means that all the
supported websites are filtered.
* The bot also creates a "local" dictionary containing a copy of the
most recent data from Redis, so whenever the bot has to decide
whether filtering a specific URL or not it doesn't need to query the database.
* Whenever the user changes a filter the database is updated alongside the local
dictionary.
@zzkW35 zzkW35 merged commit 7b585ac into main Jul 31, 2023
1 check passed
@zzkW35 zzkW35 deleted the redis-support branch July 31, 2023 21:41
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