Refactor project branding from HexaHost to Axiom across all configurations, documentation, and code files. Update environment variables, Docker setup, and README to reflect the new brand name. Ensure consistency in naming conventions and improve clarity in setup instructions.
This commit is contained in:
@@ -20,13 +20,13 @@ from slowapi import Limiter
|
||||
from slowapi.util import get_remote_address
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.hexahost import HexaHost
|
||||
from core.axiom import Axiom
|
||||
|
||||
# Initialize rate limiter
|
||||
limiter = Limiter(key_func=get_remote_address, default_limits=["1000 per minute"])
|
||||
|
||||
# Global reference to the bot instance
|
||||
_bot_instance: Optional["HexaHost"] = None
|
||||
_bot_instance: Optional["Axiom"] = None
|
||||
|
||||
# Security scheme
|
||||
security = HTTPBearer()
|
||||
@@ -53,18 +53,18 @@ def verify_api_key(credentials: HTTPAuthorizationCredentials = Security(security
|
||||
)
|
||||
return credentials.credentials
|
||||
|
||||
def set_bot(bot_instance: "HexaHost"):
|
||||
def set_bot(bot_instance: "Axiom"):
|
||||
"""
|
||||
Sets the global bot instance.
|
||||
This should be called in HexaHost.py during startup.
|
||||
This should be called in Axiom.py during startup.
|
||||
"""
|
||||
global _bot_instance
|
||||
_bot_instance = bot_instance
|
||||
|
||||
def get_bot() -> "HexaHost":
|
||||
def get_bot() -> "Axiom":
|
||||
"""
|
||||
FastAPI dependency to retrieve the Discord bot instance.
|
||||
Usage: bot: HexaHost = Depends(get_bot)
|
||||
Usage: bot: Axiom = Depends(get_bot)
|
||||
"""
|
||||
if _bot_instance is None:
|
||||
raise HTTPException(
|
||||
|
||||
Reference in New Issue
Block a user