add ban user action (#77)

* add ban user action

* fix tests

* send message through update.effective_message
This commit is contained in:
Dmitry Afanasyev
2024-01-07 16:08:23 +03:00
committed by GitHub
parent 1e79c981c2
commit 8266342214
9 changed files with 89 additions and 12 deletions

View File

@@ -12,6 +12,8 @@ if TYPE_CHECKING:
class ChatGptAdmin(ModelView, model=ChatGptModels):
name = "ChatGPT model"
name_plural = "ChatGPT models"
column_list = [ChatGptModels.id, ChatGptModels.model, ChatGptModels.priority]
column_sortable_list = [ChatGptModels.priority]
column_default_sort = ("priority", True)
@@ -22,6 +24,8 @@ class ChatGptAdmin(ModelView, model=ChatGptModels):
class UserAdmin(ModelView, model=User):
name = "User"
name_plural = "Users"
column_list = [
User.id,
User.username,