add function to remove keywords

This commit is contained in:
missytake 2025-08-27 12:04:37 +02:00
parent 74c3391b6e
commit 51d6ec297f
Signed by: missytake
GPG key ID: 04CC6658320518DF

View file

@ -55,6 +55,9 @@ def list_keywords(ac: deltachat.Account) -> set:
def rm_keyword(msg: deltachat.Message):
"""Remove keywords from the bot"""
current_words = list_keywords(msg.account)
[current_words.discard(word) for word in msg.text.split()[1:]]
msg.account.set_config("ui.keywords", "|".join(current_words))
def send_help(msg: deltachat.Message):