added ability to copy bot token

This commit is contained in:
onysd 2026-08-05 22:33:33 +03:00
parent bb1f680d3b
commit 8aad71643f
16 changed files with 294 additions and 23 deletions

View file

@ -617,6 +617,7 @@ type fakeBotService struct {
token string
createCalls int
deleteCalls int
exportCalls int
}
func (f *fakeBotService) CreateBot(_ context.Context, _ int64, name, username string) (domain.User, string, error) {
@ -629,6 +630,11 @@ func (f *fakeBotService) DeleteBot(_ context.Context, botUserID int64) (domain.U
return domain.User{ID: botUserID, Bot: true, Deleted: true}, nil
}
func (f *fakeBotService) AdminExportBotToken(_ context.Context, botUserID int64) (string, error) {
f.exportCalls++
return f.token, nil
}
type fakeRestrictionStore struct {
items map[int64]domain.AccountFreeze
setCalls int