refactor(modmail): centralize config into single /modmail config panel
Some checks failed
CI/CD / lint (push) Has been cancelled
CI/CD / test (push) Has been cancelled
CI/CD / deploy (push) Has been cancelled

- Remove 5 redundant commands (setup, addcategory, removecategory, enable, disable)
- Single /modmail config opens interactive Components V2 panel
- Channel select for ticket category, role select for staff, channel select for logs
- Toggle enable/disable button
- Categories sub-panel: add via modal, remove via select
- Fix lint (unused imports/vars, contextlib.suppress) + ruff format
This commit is contained in:
Mathis 2026-09-19 15:30:07 +02:00
parent f505b6c552
commit b736f4cc8b
6 changed files with 251 additions and 157 deletions

View file

@ -1,5 +1,4 @@
import json
from pathlib import Path
from config import DATA_DIR
@ -32,6 +31,12 @@ def get_config() -> dict:
return _load()
def set_guild_id(guild_id: int):
data = _load()
data["guild_id"] = guild_id
_save(data)
def set_enabled(guild_id: int, enabled: bool):
data = _load()
data["enabled"] = enabled