add function to remove keywords
This commit is contained in:
parent
74c3391b6e
commit
51d6ec297f
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue