stating the person who changed the language
This commit is contained in:
parent
2c7337f0e0
commit
29220fa2c5
1 changed files with 13 additions and 3 deletions
|
@ -180,13 +180,23 @@ class HSMensaW(telepot.aio.helper.ChatHandler):
|
|||
lang = query_data[:query_data.index("::")]
|
||||
chat_id = int(query_data[query_data.index("::") + 2:])
|
||||
|
||||
name = ""
|
||||
if "first_name" in msg["from"].keys():
|
||||
name = msg["from"]["first_name"] + " "
|
||||
if "last_name" in msg["from"].keys():
|
||||
name += msg["from"]["last_name"]
|
||||
if len(name) > 0:
|
||||
msg = name + " hat die Sprache geändert nach "
|
||||
else:
|
||||
msg = "Sprache geändert nach "
|
||||
|
||||
message = "Fehler beim Setzen der Sprache"
|
||||
if lang == Language.GERMAN.value:
|
||||
message = "Sprache geändert nach _deutsch_."
|
||||
message = msg + "_Deutsch_."
|
||||
elif lang == Language.ENGLISH.value:
|
||||
message = "Changed language to _english_."
|
||||
message = msg + "_English_."
|
||||
elif lang == Language.GERMAN_ENGLISH.value:
|
||||
message = "Sprache geändert nach _deutsch + englisch_. Changed language to _german + english_."
|
||||
message = msg + "_Deutsch + Englisch_."
|
||||
|
||||
if chat_id in ids:
|
||||
ids[chat_id] = Language(lang)
|
||||
|
|
Loading…
Reference in a new issue