Quellcode durchsuchen

add reply_suffix

增加私聊和群聊回复后缀的可选配置
master
vision GitHub vor 1 Jahr
Ursprung
Commit
dbe2f17e1a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. +2
    -2
      channel/chat_channel.py

+ 2
- 2
channel/chat_channel.py Datei anzeigen

@@ -223,9 +223,9 @@ class ChatChannel(Channel):
return self._decorate_reply(context, reply)
if context.get("isgroup", False):
reply_text = "@" + context["msg"].actual_user_nickname + "\n" + reply_text.strip()
reply_text = conf().get("group_chat_reply_prefix", "") + reply_text
reply_text = conf().get("group_chat_reply_prefix", "") + reply_text + conf().get("group_chat_reply_suffix", "")
else:
reply_text = conf().get("single_chat_reply_prefix", "") + reply_text
reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "")
reply.content = reply_text
elif reply.type == ReplyType.ERROR or reply.type == ReplyType.INFO:
reply.content = "[" + str(reply.type) + "]\n" + reply.content


Laden…
Abbrechen
Speichern