Initial commit: FunStat MCP Server Go implementation
- Telegram integration for customer statistics - MCP server implementation with rate limiting - Cache system for performance optimization - Multi-language support - RESTful API endpoints 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
45
internal/telegram/normalize.go
Normal file
45
internal/telegram/normalize.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package telegram
|
||||
|
||||
import "strings"
|
||||
|
||||
var buttonTextTranslations = map[rune]rune{
|
||||
'ƒ': 'f',
|
||||
'Μ': 'M',
|
||||
'τ': 't',
|
||||
'ѕ': 's',
|
||||
'η': 'n',
|
||||
'Ғ': 'F',
|
||||
'α': 'a',
|
||||
'ο': 'o',
|
||||
'ᴜ': 'u',
|
||||
'о': 'o',
|
||||
'е': 'e',
|
||||
'с': 'c',
|
||||
'℮': 'e',
|
||||
'Τ': 'T',
|
||||
'ρ': 'p',
|
||||
'Δ': 'D',
|
||||
'χ': 'x',
|
||||
'β': 'b',
|
||||
'λ': 'l',
|
||||
'γ': 'y',
|
||||
'Ν': 'N',
|
||||
'μ': 'm',
|
||||
'ψ': 'y',
|
||||
'Α': 'A',
|
||||
'Ρ': 'P',
|
||||
'С': 'C',
|
||||
'ё': 'e',
|
||||
'ł': 'l',
|
||||
'Ł': 'L',
|
||||
'ց': 'g',
|
||||
}
|
||||
|
||||
func normalizeButtonText(text string) string {
|
||||
return strings.Map(func(r rune) rune {
|
||||
if mapped, ok := buttonTextTranslations[r]; ok {
|
||||
return mapped
|
||||
}
|
||||
return r
|
||||
}, text)
|
||||
}
|
||||
Reference in New Issue
Block a user