Rename tgapi request structs

Add MaybeInaccessibleMessage tests and godoc
Update wiki and Bot API docs for the new naming
This commit is contained in:
2026-04-06 16:06:57 +03:00
parent d55f58c092
commit 83bcab6415
40 changed files with 1946 additions and 914 deletions
+3 -3
View File
@@ -143,7 +143,7 @@ func RequireChatAdmin[T AppData]() Policy[T] {
return AsInternalError(errors.New("chat-admin policy requires message chat context"))
}
member, err := ctx.Api.GetChatMember(tgapi.GetChatMemberP{
member, err := ctx.Api.GetChatMember(tgapi.GetChatMember{
ChatID: ctx.ChatID,
UserID: ctx.FromID,
})
@@ -166,7 +166,7 @@ func RequireChatCreator[T AppData]() Policy[T] {
return AsInternalError(errors.New("chat-creator policy requires message chat context"))
}
member, err := ctx.Api.GetChatMember(tgapi.GetChatMemberP{
member, err := ctx.Api.GetChatMember(tgapi.GetChatMember{
ChatID: ctx.ChatID,
UserID: ctx.FromID,
})
@@ -194,7 +194,7 @@ func RequireBotAdmin[T AppData]() Policy[T] {
return AsInternalError(fmt.Errorf("failed to fetch bot info: %w", err))
}
member, err := ctx.Api.GetChatMember(tgapi.GetChatMemberP{
member, err := ctx.Api.GetChatMember(tgapi.GetChatMember{
ChatID: ctx.ChatID,
UserID: bot.ID,
})