mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-16 08:20:31 +08:00
optimize: メッセージ送信機能
This commit is contained in:
@@ -63,6 +63,14 @@ func MessageUnescape(text string) string {
|
||||
return text
|
||||
}
|
||||
|
||||
// HideURL 转义 URL 以避免审核
|
||||
func HideURL(s string) string {
|
||||
s = strings.ReplaceAll(s, ".", "…")
|
||||
s = strings.ReplaceAll(s, "http://", "🔗📄:")
|
||||
s = strings.ReplaceAll(s, "https://", "🔗🔒:")
|
||||
return s
|
||||
}
|
||||
|
||||
// UnderlineToCamel convert abc_def to AbcDef
|
||||
func UnderlineToCamel(s string) string {
|
||||
sb := strings.Builder{}
|
||||
|
||||
Reference in New Issue
Block a user