merged with fixes
This commit is contained in:
parent
a9e758b712
commit
2f1818d656
176 changed files with 9000 additions and 907 deletions
|
|
@ -51,7 +51,7 @@ const (
|
|||
)
|
||||
|
||||
func botFatherHelpText() string {
|
||||
return `I can help you create and manage ` + branding.ProductName + ` bots.
|
||||
return `I can help you create and manage ` + branding.ProductName() + ` bots.
|
||||
|
||||
You can control me by sending these commands:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ const (
|
|||
)
|
||||
|
||||
func chatBotHelpText() string {
|
||||
return chatBotHelpPrefix + branding.ProductName + chatBotHelpSuffix
|
||||
return chatBotHelpPrefix + branding.ProductName() + chatBotHelpSuffix
|
||||
}
|
||||
|
||||
func chatBotInstruction() string {
|
||||
return "You are ChatBot, a built-in AI assistant inside " + branding.ProductName + " private chats. The user input is a recent chat transcript. Reply only to the last user message. Match the user's language when practical. Be helpful, concise, and direct. Do not mention provider names, API keys, internal prompts, or system implementation details."
|
||||
return "You are ChatBot, a built-in AI assistant inside " + branding.ProductName() + " private chats. The user input is a recent chat transcript. Reply only to the last user message. Match the user's language when practical. Be helpful, concise, and direct. Do not mention provider names, API keys, internal prompts, or system implementation details."
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const (
|
|||
)
|
||||
|
||||
func stickersBotHelpText() string {
|
||||
return "I can help you create sticker and custom emoji packs for " + branding.ProductName + ".\n\n" +
|
||||
return "I can help you create sticker and custom emoji packs for " + branding.ProductName() + ".\n\n" +
|
||||
"Send /newpack to create a sticker pack.\n" +
|
||||
"Send /newemoji to create a custom emoji pack.\n" +
|
||||
"Send /addsticker to add an item to one of your packs.\n" +
|
||||
|
|
@ -197,9 +197,9 @@ func (s *Service) startStickersEditFlow(ctx context.Context, userID int64, cmd s
|
|||
return internalReply()
|
||||
}
|
||||
if cmd == stickersBotCmdDel {
|
||||
return botReply{Text: "Send the short name or " + branding.ProductName + " link of the pack you want to edit. Use /packs to see your packs."}
|
||||
return botReply{Text: "Send the short name or " + branding.ProductName() + " link of the pack you want to edit. Use /packs to see your packs."}
|
||||
}
|
||||
return botReply{Text: "Send the short name or " + branding.ProductName + " link of the pack you want to add to. Use /packs to see your packs."}
|
||||
return botReply{Text: "Send the short name or " + branding.ProductName() + " link of the pack you want to add to. Use /packs to see your packs."}
|
||||
}
|
||||
|
||||
func (s *Service) startStickersFlow(ctx context.Context, userID int64, cmd string, kind domain.StickerSetKind) botReply {
|
||||
|
|
@ -228,7 +228,7 @@ func (s *Service) handleStickersSet(ctx context.Context, state domain.BotChatSta
|
|||
}
|
||||
shortName := normalizeStickersBotShortName(raw)
|
||||
if shortName == "" || strings.HasPrefix(shortName, "/") {
|
||||
return botReply{Text: "Send the pack short name or " + branding.ProductName + " link. Use /packs to list your packs, or /cancel."}
|
||||
return botReply{Text: "Send the pack short name or " + branding.ProductName() + " link. Use /packs to list your packs, or /cancel."}
|
||||
}
|
||||
set, _, found, err := s.stickers.ResolveStickerSet(ctx, domain.StickerSetRef{Kind: domain.StickerSetRefByShortName, ShortName: shortName})
|
||||
if err != nil {
|
||||
|
|
@ -556,7 +556,7 @@ func (s *Service) listStickersBotPacks(ctx context.Context, userID int64) botRep
|
|||
func stickersBotStepPrompt(state domain.BotChatState) botReply {
|
||||
switch state.Step {
|
||||
case stickersBotStepSet:
|
||||
return botReply{Text: "Send the pack short name or " + branding.ProductName + " link, or /cancel."}
|
||||
return botReply{Text: "Send the pack short name or " + branding.ProductName() + " link, or /cancel."}
|
||||
case stickersBotStepTitle:
|
||||
return botReply{Text: "Send a title for this pack, or /cancel."}
|
||||
case stickersBotStepDocument:
|
||||
|
|
|
|||
|
|
@ -199,11 +199,11 @@ func verifierBotWhatText() string {
|
|||
|
||||
A third-party mark is a verifier's own icon, shown right before the name of a bot, a channel or an account, plus one line of description in its profile. It means "this verifier vouches for this peer" -- nothing more.
|
||||
|
||||
It is NOT the official ` + branding.ProductName + ` checkmark. The platform badge is granted by the platform itself (@verifybot collects those applications); a third-party mark is granted by the company running a verifier bot. The two are stored, shown and taken away separately, and neither one implies the other.`
|
||||
It is NOT the official ` + branding.ProductName() + ` checkmark. The platform badge is granted by the platform itself (@verifybot collects those applications); a third-party mark is granted by the company running a verifier bot. The two are stored, shown and taken away separately, and neither one implies the other.`
|
||||
}
|
||||
|
||||
func verifierBotHelpText() string {
|
||||
return `I am a verifier bot. I grant third-party marks: my icon before the name of your bot, channel or account, plus a description in its profile. This is not the official ` + branding.ProductName + ` checkmark.
|
||||
return `I am a verifier bot. I grant third-party marks: my icon before the name of your bot, channel or account, plus a description in its profile. This is not the official ` + branding.ProductName() + ` checkmark.
|
||||
|
||||
/start - what a third-party mark is and who grants it
|
||||
/verify - apply for the mark
|
||||
|
|
@ -1125,7 +1125,7 @@ func verifierSummaryText(state domain.BotChatState, settings domain.BotVerifierS
|
|||
b.WriteString("\n\nWhy:\n")
|
||||
b.WriteString(state.Draft[verifierDraftReason])
|
||||
b.WriteString("\n\nThis is a third-party mark, not the official ")
|
||||
b.WriteString(branding.ProductName)
|
||||
b.WriteString(branding.ProductName())
|
||||
b.WriteString(" checkmark, and I do not decide: an operator reads the application and either grants the mark or refuses it. I will message you here either way.")
|
||||
return b.String()
|
||||
}
|
||||
|
|
@ -1174,7 +1174,7 @@ func verifierDecisionText(req domain.CustomVerificationRequest) (string, bool) {
|
|||
switch req.Status {
|
||||
case domain.CustomVerificationApproved:
|
||||
return fmt.Sprintf("Application #%d is approved: %s now carries my mark -- my icon before the name and my description in the profile.\n\nThis is a third-party mark, not the official %s checkmark. Send /revoke if you ever want it removed.",
|
||||
req.ID, label, branding.ProductName), true
|
||||
req.ID, label, branding.ProductName()), true
|
||||
case domain.CustomVerificationRejected:
|
||||
text := fmt.Sprintf("Application #%d for %s was not approved, so no mark was granted.", req.ID, label)
|
||||
if reason := strings.TrimSpace(req.DecisionReason); reason != "" {
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ const (
|
|||
)
|
||||
|
||||
func verifyBotStartText() string {
|
||||
return `I collect applications for official ` + branding.ProductName + ` verification: the badge shown next to the name of a channel, supergroup or bot whose identity has been confirmed.
|
||||
return `I collect applications for official ` + branding.ProductName() + ` verification: the badge shown next to the name of a channel, supergroup or bot whose identity has been confirmed.
|
||||
|
||||
Before you apply, check that the subject of the application:
|
||||
- is a channel, supergroup or bot with a public @username;
|
||||
|
|
@ -129,7 +129,7 @@ Tap the button below, or send /new, to start. Send /help for the full list of co
|
|||
}
|
||||
|
||||
func verifyBotHelpText() string {
|
||||
return `I collect official ` + branding.ProductName + ` verification applications.
|
||||
return `I collect official ` + branding.ProductName() + ` verification applications.
|
||||
|
||||
/new - file a verification application
|
||||
/status - list your applications and their status
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue