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:
@@ -1,6 +1,6 @@
|
||||
TOKEN=TOKEN_HERE
|
||||
brand_name='HexaHost'
|
||||
NEXT_PUBLIC_BRAND_NAME='HexaHost'
|
||||
brand_name='Axiom'
|
||||
NEXT_PUBLIC_BRAND_NAME='Axiom'
|
||||
|
||||
# ── Multiple instances (optional) ─────────────────────────────────────────────
|
||||
# Run several bot processes on one host — each needs its own .env / TOKEN / API_PORT.
|
||||
|
||||
@@ -28,7 +28,7 @@ from discord.ext import commands, tasks
|
||||
|
||||
from core import Context
|
||||
from core.Cog import Cog
|
||||
from core.hexahost import HexaHost
|
||||
from core.axiom import Axiom
|
||||
from utils.Tools import *
|
||||
from utils.config import *
|
||||
from utils.emoji import SUCCESS, ERROR, TICK, CROSS, REACTION_TEST_EMOJIS
|
||||
@@ -50,7 +50,7 @@ if not OWNER_IDS:
|
||||
print("\033[33m⚠ OWNER_IDS is not set in .env — no bot owners configured.\033[0m")
|
||||
print("\033[33m Set OWNER_IDS=YOUR_DISCORD_USER_ID before running in production.\033[0m")
|
||||
|
||||
client = HexaHost()
|
||||
client = Axiom()
|
||||
tree = client.tree
|
||||
|
||||
# --- Background Task for Stats ---
|
||||
@@ -1,4 +1,4 @@
|
||||
# HexaHost Discord Bot + FastAPI dashboard backend
|
||||
# Axiom Discord Bot + FastAPI dashboard backend (by HexaHost)
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
@@ -26,4 +26,4 @@ RUN mkdir -p /app/db /app/jsondb /app/logs
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["python", "HexaHost.py"]
|
||||
CMD ["python", "Axiom.py"]
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<div align="center">
|
||||
|
||||
```
|
||||
+-+-+-+-+-+-+-+-+
|
||||
|H|e|x|a|H|o|s|t|
|
||||
+-+-+-+-+-+-+-+-+
|
||||
+-+-+-+-+-+
|
||||
|A|x|i|o|m|
|
||||
+-+-+-+-+-+
|
||||
by HexaHost
|
||||
```
|
||||
|
||||
<h3>HexaHost Bot — Python Discord Bot + FastAPI Backend</h3>
|
||||
<h3>Axiom Bot — Python Discord Bot + FastAPI Backend</h3>
|
||||
|
||||
<a href="https://nexiohost.in"><img src="https://img.shields.io/badge/⭐%20PREMIUM%20HOSTING-NexioHost-FFD700?style=for-the-badge&labelColor=1a1a2e&color=FFD700&logoColor=FFD700"/></a>
|
||||
|
||||
@@ -27,7 +28,7 @@
|
||||
|
||||
## ✦ Overview
|
||||
|
||||
This folder contains the HexaHost Discord bot built on `discord.py v2` alongside a `FastAPI` backend that powers the web dashboard. Everything runs from a single `python HexaHost.py` command.
|
||||
This folder contains the Axiom Discord bot built on `discord.py v2` alongside a `FastAPI` backend that powers the web dashboard. Everything runs from a single `python Axiom.py` command.
|
||||
|
||||
```
|
||||
bot/
|
||||
@@ -39,12 +40,12 @@ bot/
|
||||
│ ├── commands/ All slash & prefix command modules
|
||||
│ ├── events/ General Discord event listeners
|
||||
│ ├── moderation/ Moderation action modules
|
||||
│ └── hexahost/ Core HexaHost feature cogs
|
||||
│ └── axiom/ Help / feature index cogs
|
||||
├── core/ Bot client, context, cog base classes
|
||||
├── games/ Standalone game logic + button views
|
||||
├── utils/ Emoji, tools, sync, Cloudflare tunnel
|
||||
├── assets/ Fonts, backgrounds, GIFs
|
||||
└── HexaHost.py Entry point
|
||||
└── Axiom.py Entry point
|
||||
```
|
||||
|
||||
---
|
||||
@@ -132,7 +133,7 @@ bot/
|
||||
- Slash + prefix commands
|
||||
- Cloudflare Tunnel via pycloudflared — zero system installs, unlimited traffic
|
||||
- Single `OWNER_IDS` env var controls all permission checks
|
||||
- HexaHost watermark on every source file
|
||||
- HexaHost manufacturer watermark on every source file
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@@ -174,7 +175,7 @@ Create a `.env` file (copy from `.env.example`):
|
||||
```env
|
||||
# ── Core ──────────────────────────────────────────────────────────
|
||||
TOKEN = your_discord_bot_token
|
||||
brand_name = 'HexaHost'
|
||||
brand_name = 'Axiom'
|
||||
|
||||
# ── Owner IDs (REQUIRED — your Discord user ID) ───────────────────
|
||||
OWNER_IDS = YOUR_DISCORD_USER_ID_HERE
|
||||
@@ -208,7 +209,7 @@ CF_TUNNEL_URL = "https://api.yourdomain.com"
|
||||
### 3 — Run
|
||||
|
||||
```bash
|
||||
python HexaHost.py
|
||||
python Axiom.py
|
||||
```
|
||||
|
||||
---
|
||||
@@ -258,7 +259,7 @@ Uses **pycloudflared** — downloads the `cloudflared` binary automatically on f
|
||||
**Setup (browser only — no CLI needed):**
|
||||
|
||||
1. Go to [one.dash.cloudflare.com](https://one.dash.cloudflare.com) → **Networks → Tunnels → Create a tunnel**
|
||||
2. Choose **Cloudflared**, name it (e.g. `hexahost-api`), save
|
||||
2. Choose **Cloudflared**, name it (e.g. `axiom-api`), save
|
||||
3. On **Install connector**, copy the token from the command shown:
|
||||
```
|
||||
cloudflared tunnel run --token <COPY_THIS_TOKEN>
|
||||
@@ -300,7 +301,7 @@ When `EMOJI_SYNC=true`, the bot syncs application emojis on every startup:
|
||||
Upload the entire `bot/` folder to your host and set the start command to:
|
||||
|
||||
```bash
|
||||
python HexaHost.py
|
||||
python Axiom.py
|
||||
```
|
||||
|
||||
`pycloudflared` downloads the binary on first run — no extra steps on any host.
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -20,7 +20,7 @@ import os
|
||||
import aiosqlite
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.hexahost import HexaHost
|
||||
from core.axiom import Axiom
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -38,7 +38,7 @@ import psutil
|
||||
import time
|
||||
|
||||
@router.get("/stats", response_model=AdminStats)
|
||||
async def get_admin_stats(bot: "HexaHost" = Depends(get_bot)):
|
||||
async def get_admin_stats(bot: "Axiom" = Depends(get_bot)):
|
||||
# Calculate DB size and shard info
|
||||
total_size: float = 0.0
|
||||
db_count = 0
|
||||
|
||||
@@ -19,12 +19,12 @@ from utils.config import *
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.hexahost import HexaHost
|
||||
from core.axiom import Axiom
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/status", response_model=BotStatus, summary="Get bot status", description="Returns real-time health metrics, latency, and scale information.")
|
||||
async def get_status(bot: "HexaHost" = Depends(get_bot)):
|
||||
async def get_status(bot: "Axiom" = Depends(get_bot)):
|
||||
"""
|
||||
Returns the live status of the bot.
|
||||
"""
|
||||
@@ -38,7 +38,7 @@ async def get_status(bot: "HexaHost" = Depends(get_bot)):
|
||||
)
|
||||
|
||||
@router.get("/info", response_model=BotInfo, summary="Get bot info", description="Returns general information about the bot including command count and user reach.")
|
||||
async def get_bot_info(bot: "HexaHost" = Depends(get_bot)):
|
||||
async def get_bot_info(bot: "Axiom" = Depends(get_bot)):
|
||||
"""
|
||||
Get general information about the Discord bot.
|
||||
"""
|
||||
|
||||
@@ -37,13 +37,13 @@ import json
|
||||
import os
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.hexahost import HexaHost
|
||||
from core.axiom import Axiom
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/", response_model=List[GuildSummary], summary="List all guilds", description="Returns guilds the authenticated user can manage that the bot is in.")
|
||||
async def list_guilds(request: Request, bot: "HexaHost" = Depends(get_bot)):
|
||||
async def list_guilds(request: Request, bot: "Axiom" = Depends(get_bot)):
|
||||
"""
|
||||
Lists guilds the bot is in, filtered to those the caller can manage on Discord.
|
||||
"""
|
||||
@@ -64,7 +64,7 @@ async def list_guilds(request: Request, bot: "HexaHost" = Depends(get_bot)):
|
||||
return guilds_list
|
||||
|
||||
@router.get("/{guild_id}", response_model=GuildDetails, summary="Get guild details", description="Returns detailed metrics and metadata for a specific Discord guild.")
|
||||
async def get_guild_details(guild_id: int, bot: "HexaHost" = Depends(get_bot)):
|
||||
async def get_guild_details(guild_id: int, bot: "Axiom" = Depends(get_bot)):
|
||||
"""
|
||||
Returns detailed info for a specific guild by its ID.
|
||||
"""
|
||||
@@ -820,7 +820,7 @@ async def get_guild_j2c(guild_id: int):
|
||||
return J2CConfig(guild_id=str(guild_id))
|
||||
|
||||
@router.patch("/{guild_id}/j2c", summary="Update J2C config")
|
||||
async def patch_guild_j2c(guild_id: int, data: J2CUpdate, bot: "HexaHost" = Depends(get_bot)):
|
||||
async def patch_guild_j2c(guild_id: int, data: J2CUpdate, bot: "Axiom" = Depends(get_bot)):
|
||||
import aiosqlite
|
||||
|
||||
def to_id(val):
|
||||
@@ -1000,7 +1000,7 @@ async def patch_guild_customroles(guild_id: int, data: CustomRoleUpdate):
|
||||
return {"status": "success"}
|
||||
|
||||
@router.get("/{guild_id}/logging", response_model=LoggingConfig, summary="Get Logging config", description="Retrieves the event logging configuration and designated log channels.")
|
||||
async def get_guild_logging(guild_id: int, bot: "HexaHost" = Depends(get_bot)):
|
||||
async def get_guild_logging(guild_id: int, bot: "Axiom" = Depends(get_bot)):
|
||||
"""
|
||||
Retrieves the logging configuration for a specific guild.
|
||||
"""
|
||||
@@ -1044,7 +1044,7 @@ async def get_guild_logging(guild_id: int, bot: "HexaHost" = Depends(get_bot)):
|
||||
)
|
||||
|
||||
@router.patch("/{guild_id}/logging", summary="Update Logging config", description="Updates which Discord events are logged and where they are posted.")
|
||||
async def patch_guild_logging(guild_id: int, data: LoggingUpdate, bot: "HexaHost" = Depends(get_bot)):
|
||||
async def patch_guild_logging(guild_id: int, data: LoggingUpdate, bot: "Axiom" = Depends(get_bot)):
|
||||
"""
|
||||
Updates the logging configuration for a specific guild.
|
||||
"""
|
||||
@@ -1076,7 +1076,7 @@ async def patch_guild_logging(guild_id: int, data: LoggingUpdate, bot: "HexaHost
|
||||
return {"status": "success", "guild_id": guild_id}
|
||||
|
||||
@router.get("/{guild_id}/leveling/leaderboard", response_model=List[LeaderboardEntry], summary="Get leveling leaderboard", description="Returns top users by XP for a specific guild.")
|
||||
async def get_leveling_leaderboard(guild_id: int, bot: "HexaHost" = Depends(get_bot)):
|
||||
async def get_leveling_leaderboard(guild_id: int, bot: "Axiom" = Depends(get_bot)):
|
||||
db = await db_manager.get_connection(db_path('leveling.db'))
|
||||
cursor = await db.execute(
|
||||
"SELECT user_id, xp FROM user_xp WHERE guild_id = ? ORDER BY xp DESC LIMIT 100",
|
||||
@@ -1116,7 +1116,7 @@ async def get_leveling_leaderboard(guild_id: int, bot: "HexaHost" = Depends(get_
|
||||
return leaderboard
|
||||
|
||||
@router.get("/{guild_id}/channels", response_model=List[DiscordChannel], summary="Get guild channels", description="Returns a list of all channels for the specific guild.")
|
||||
async def get_guild_channels(guild_id: int, bot: "HexaHost" = Depends(get_bot)):
|
||||
async def get_guild_channels(guild_id: int, bot: "Axiom" = Depends(get_bot)):
|
||||
guild = bot.get_guild(guild_id)
|
||||
if not guild:
|
||||
raise HTTPException(status_code=404, detail="Guild not found")
|
||||
@@ -1136,7 +1136,7 @@ async def get_guild_channels(guild_id: int, bot: "HexaHost" = Depends(get_bot)):
|
||||
return channels
|
||||
|
||||
@router.get("/{guild_id}/roles", response_model=List[DiscordRole], summary="Get guild roles", description="Returns a list of roles for the specific guild.")
|
||||
async def get_guild_roles(guild_id: int, bot: "HexaHost" = Depends(get_bot)):
|
||||
async def get_guild_roles(guild_id: int, bot: "Axiom" = Depends(get_bot)):
|
||||
guild = bot.get_guild(guild_id)
|
||||
if not guild:
|
||||
raise HTTPException(status_code=404, detail="Guild not found")
|
||||
|
||||
@@ -52,8 +52,8 @@ async def lifespan(app: FastAPI):
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
"""
|
||||
Initializes the FastAPI application for the HexaHost Bot Dashboard.
|
||||
The bot instance will be attached to app.state.bot in HexaHost.py at runtime.
|
||||
Initializes the FastAPI application for the Axiom Bot Dashboard.
|
||||
The bot instance will be attached to app.state.bot in Axiom.py at runtime.
|
||||
"""
|
||||
app = FastAPI(
|
||||
title=f"{BRAND_NAME} Bot API",
|
||||
|
||||
@@ -15,7 +15,7 @@ from __future__ import annotations
|
||||
|
||||
from colorama import Fore, Style
|
||||
|
||||
from core import HexaHost
|
||||
from core import Axiom
|
||||
from utils.config import BotName
|
||||
|
||||
from .commands.help import Help
|
||||
@@ -94,34 +94,34 @@ from .events.autoreact import AutoReactListener
|
||||
from .events.ai import AIResponses
|
||||
from .events.stickymessage import StickyMessageListener
|
||||
|
||||
from .hexahost.antinuke import _antinuke
|
||||
from .hexahost.extra import _extra
|
||||
from .hexahost.general import _general
|
||||
from .hexahost.automod import _automod
|
||||
from .hexahost.moderation import _moderation
|
||||
from .hexahost.music import _music
|
||||
from .hexahost.fun import _fun
|
||||
from .hexahost.games import _games
|
||||
from .hexahost.ignore import _ignore
|
||||
from .hexahost.server import _server
|
||||
from .hexahost.voice import _voice
|
||||
from .hexahost.welcome import _welcome
|
||||
from .hexahost.giveaway import _giveaway
|
||||
from .hexahost.ticket import _ticket
|
||||
from .hexahost.logging import _logging
|
||||
from .hexahost.vanity import _vanity
|
||||
from .hexahost.inviteTracker import inviteTracker
|
||||
from .hexahost.counting import _Counting
|
||||
from .hexahost.j2c import _J2C
|
||||
from .hexahost.ai import _ai
|
||||
from .hexahost.booster import __boost
|
||||
from .hexahost.leveling import _leveling
|
||||
from .hexahost.sticky import _sticky
|
||||
from .hexahost.verify import _verify
|
||||
from .hexahost.encryption import _encrypt
|
||||
from .hexahost.mc import _mc
|
||||
from .hexahost.joindm import _joindm
|
||||
from .hexahost.birth import _birth
|
||||
from .axiom.antinuke import _antinuke
|
||||
from .axiom.extra import _extra
|
||||
from .axiom.general import _general
|
||||
from .axiom.automod import _automod
|
||||
from .axiom.moderation import _moderation
|
||||
from .axiom.music import _music
|
||||
from .axiom.fun import _fun
|
||||
from .axiom.games import _games
|
||||
from .axiom.ignore import _ignore
|
||||
from .axiom.server import _server
|
||||
from .axiom.voice import _voice
|
||||
from .axiom.welcome import _welcome
|
||||
from .axiom.giveaway import _giveaway
|
||||
from .axiom.ticket import _ticket
|
||||
from .axiom.logging import _logging
|
||||
from .axiom.vanity import _vanity
|
||||
from .axiom.inviteTracker import inviteTracker
|
||||
from .axiom.counting import _Counting
|
||||
from .axiom.j2c import _J2C
|
||||
from .axiom.ai import _ai
|
||||
from .axiom.booster import __boost
|
||||
from .axiom.leveling import _leveling
|
||||
from .axiom.sticky import _sticky
|
||||
from .axiom.verify import _verify
|
||||
from .axiom.encryption import _encrypt
|
||||
from .axiom.mc import _mc
|
||||
from .axiom.joindm import _joindm
|
||||
from .axiom.birth import _birth
|
||||
|
||||
from .antinuke.anti_member_update import AntiMemberUpdate
|
||||
from .antinuke.antiban import AntiBan
|
||||
@@ -191,7 +191,7 @@ COG_CLASSES: tuple[type, ...] = (
|
||||
)
|
||||
|
||||
|
||||
async def setup(bot: HexaHost) -> None:
|
||||
async def setup(bot: Axiom) -> None:
|
||||
for cog_cls in COG_CLASSES:
|
||||
await bot.add_cog(cog_cls(bot))
|
||||
print(Fore.RED + Style.BRIGHT + f"Loaded cog: {cog_cls.__name__}")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
import os
|
||||
from core import Cog, HexaHost, Context
|
||||
from core import Cog, Axiom, Context
|
||||
import games as games
|
||||
from utils.Tools import *
|
||||
from utils.cv2 import CV2
|
||||
@@ -25,9 +25,9 @@ import asyncio
|
||||
|
||||
|
||||
class Games(Cog):
|
||||
"""HexaHost Games"""
|
||||
"""Axiom Games"""
|
||||
|
||||
def __init__(self, client: HexaHost):
|
||||
def __init__(self, client: Axiom):
|
||||
self.client = client
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import datetime
|
||||
import re
|
||||
from typing import *
|
||||
from time import strftime
|
||||
from core import Cog, HexaHost, Context
|
||||
from core import Cog, Axiom, Context
|
||||
from discord.ui import LayoutView, TextDisplay, Separator, Container
|
||||
from utils.cv2 import CV2, build_container
|
||||
|
||||
@@ -49,7 +49,7 @@ datefmt ="%H:%M:%S",
|
||||
)
|
||||
|
||||
class Booster (Cog ):
|
||||
def __init__ (self ,bot : HexaHost ):
|
||||
def __init__ (self ,bot : Axiom ):
|
||||
self .bot =bot
|
||||
self .color =0xFF0000
|
||||
self .db_path =db_path("boost.db")
|
||||
|
||||
@@ -30,7 +30,7 @@ from typing import *
|
||||
from utils import *
|
||||
from utils.config import BotName, serverLink
|
||||
from utils import Paginator, DescriptionEmbedPaginator, FieldPagePaginator, TextPaginator
|
||||
from core import Cog, HexaHost, Context
|
||||
from core import Cog, Axiom, Context
|
||||
from typing import Optional
|
||||
import aiosqlite
|
||||
import asyncio
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
import asyncio
|
||||
import discord
|
||||
from utils.emoji import CROSS, TICK, ZWARNING, HEXAHOST_CONNECTION, HEXAHOST_LINKS
|
||||
from utils.emoji import CROSS, TICK, ZWARNING, AXIOM_CONNECTION, AXIOM_LINKS
|
||||
from discord.ext import commands, tasks
|
||||
from discord.utils import get
|
||||
import datetime
|
||||
@@ -308,8 +308,8 @@ class General(commands.Cog):
|
||||
async def invite(self, ctx: commands.Context):
|
||||
invite_text = (
|
||||
"```Empower your server with blazing-fast features and 24/7 support!```\n"
|
||||
f"{HEXAHOST_LINKS} **Quick Actions**\n"
|
||||
f"{AXIOM_LINKS} **Quick Actions**\n"
|
||||
f">>> **[Invite {BotName}](https://discord.com/oauth2/authorize?client_id=1396114795102470196&permissions=8&integration_type=0&scope=bot+applications.commands)**\n"
|
||||
"**[Support Server](https://discord.gg/hexahost)**"
|
||||
)
|
||||
await ctx.send(view=CV2(f"{HEXAHOST_CONNECTION} {BotName} Integration Hub!", invite_text))
|
||||
await ctx.send(view=CV2(f"{AXIOM_CONNECTION} {BotName} Integration Hub!", invite_text))
|
||||
@@ -18,7 +18,7 @@ from discord import app_commands, Interaction
|
||||
from difflib import get_close_matches
|
||||
from contextlib import suppress
|
||||
from core import Context
|
||||
from core.hexahost import HexaHost
|
||||
from core.axiom import Axiom
|
||||
from core.Cog import Cog
|
||||
from utils.Tools import getConfig
|
||||
from itertools import chain
|
||||
@@ -268,7 +268,7 @@ class HelpCommand(commands.HelpCommand):
|
||||
|
||||
class Help(Cog, name="help"):
|
||||
|
||||
def __init__(self, client: HexaHost):
|
||||
def __init__(self, client: Axiom):
|
||||
self._original_help_command = client.help_command
|
||||
attributes = {
|
||||
'name': "help",
|
||||
|
||||
@@ -21,7 +21,7 @@ from discord.ui import Button, View, LayoutView, TextDisplay, Separator, Contain
|
||||
import wavelink
|
||||
from wavelink.enums import TrackSource
|
||||
from utils import Paginator, DescriptionEmbedPaginator
|
||||
from core import Cog, HexaHost, Context
|
||||
from core import Cog, Axiom, Context
|
||||
from PIL import Image, ImageDraw, ImageFont, ImageOps
|
||||
import io
|
||||
import aiohttp
|
||||
@@ -334,7 +334,7 @@ class MusicControlView(LayoutView):
|
||||
|
||||
|
||||
class Music(commands.Cog):
|
||||
def __init__(self, client: HexaHost):
|
||||
def __init__(self, client: Axiom):
|
||||
self.client = client
|
||||
self.client.loop.create_task(self.connect_nodes())
|
||||
self.client.loop.create_task(self.monitor_inactivity())
|
||||
|
||||
@@ -15,7 +15,7 @@ from utils.db_paths import db_path
|
||||
from discord.ext import commands, tasks
|
||||
from discord import *
|
||||
import discord
|
||||
from utils.emoji import BOOST, ICONS_WARNING, INFO, MENTION, PREMIUM, TICK, TIME, TIMER_ALT1, U_ADMIN, ZDIL, ZHUMAN, HEXAHOST_HAMMER, HEXAHOST_SYS
|
||||
from utils.emoji import BOOST, ICONS_WARNING, INFO, MENTION, PREMIUM, TICK, TIME, TIMER_ALT1, U_ADMIN, ZDIL, ZHUMAN, AXIOM_HAMMER, AXIOM_SYS
|
||||
import aiosqlite
|
||||
from typing import Optional
|
||||
from datetime import datetime, timedelta
|
||||
@@ -143,7 +143,7 @@ class TimeSelect(Select):
|
||||
await log_channel.send(view=embed)
|
||||
|
||||
embed = CV2Embed(
|
||||
description=f"**Added Global No Prefix**:\n{ZHUMAN} User: **{self.user.mention}**\n{MENTION} User Mention: {self.user.mention}\n{HEXAHOST_SYS} User ID: {self.user.id}\n\n__**Additional Info**__:\n{HEXAHOST_HAMMER} Added By: **{self.author.display_name}**\n{TIME} Expiry Time: {expiry_text}\n{BOOST} Timestamp: {expiry_timestamp}",
|
||||
description=f"**Added Global No Prefix**:\n{ZHUMAN} User: **{self.user.mention}**\n{MENTION} User Mention: {self.user.mention}\n{AXIOM_SYS} User ID: {self.user.id}\n\n__**Additional Info**__:\n{AXIOM_HAMMER} Added By: **{self.author.display_name}**\n{TIME} Expiry Time: {expiry_text}\n{BOOST} Timestamp: {expiry_timestamp}",
|
||||
color=0xFF0000,
|
||||
)
|
||||
embed.set_author(
|
||||
|
||||
@@ -26,7 +26,7 @@ from utils import Paginator, DescriptionEmbedPaginator, FieldPagePaginator, Text
|
||||
from utils.Tools import *
|
||||
from utils.config import OWNER_IDS, BOT_OWNER_IDS
|
||||
from utils.emoji import BOOSTS, DISCORD_BADGE_EMOJIS, LOADINGRED, NITRO_BOOST, TICK, ZWARNING
|
||||
from core import Cog, HexaHost, Context
|
||||
from core import Cog, Axiom, Context
|
||||
import sqlite3
|
||||
import os
|
||||
import requests
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
from utils.db_paths import db_path
|
||||
|
||||
import discord
|
||||
from utils.emoji import CODEBASE, LOADING, SYSTEM, THUNDER, HEXAHOST_CODE, HEXAHOST_COMMAND, HEXAHOST_GLOBAL, HEXAHOST_OWNER, HEXAHOST_SEARCH
|
||||
from utils.emoji import CODEBASE, LOADING, SYSTEM, THUNDER, AXIOM_CODE, AXIOM_COMMAND, AXIOM_GLOBAL, AXIOM_OWNER, AXIOM_SEARCH
|
||||
import psutil
|
||||
import sys
|
||||
import os
|
||||
@@ -60,27 +60,27 @@ def create_stats_content(stats_data, selected):
|
||||
f"**{SYSTEM} Hardware**\n"
|
||||
f"Cpu Usage: **{stats_data['cpu']}%**\n"
|
||||
f"Ram Usage: **{stats_data['ram']}%**\n\n"
|
||||
f"**{HEXAHOST_CODE} Software**\n"
|
||||
f"**{AXIOM_CODE} Software**\n"
|
||||
f"Python: **{sys.version_info.major}.{sys.version_info.minor}**\n"
|
||||
f"Discord.py: **{discord.__version__}**"
|
||||
),
|
||||
"General Info": (
|
||||
f"**Uptime**: `{stats_data['uptime']}`\n\n"
|
||||
f"**{HEXAHOST_GLOBAL} Server Stats**\n"
|
||||
f"**{AXIOM_GLOBAL} Server Stats**\n"
|
||||
f"Guilds: **{stats_data['guilds']}**\n"
|
||||
f"Users: **{stats_data['users']}**\n\n"
|
||||
f"**{HEXAHOST_COMMAND} Commands Stats**\n"
|
||||
f"**{AXIOM_COMMAND} Commands Stats**\n"
|
||||
f"Total Commands: **{stats_data['all_cmds']}**\n"
|
||||
f"Slash Commands: **{stats_data['slash_cmds']}**"
|
||||
),
|
||||
"Team Info": (
|
||||
"There is only one person who made me. Thanks to him ❤️.\n\n"
|
||||
f"**{HEXAHOST_OWNER} Main Owner**\n"
|
||||
f"**{AXIOM_OWNER} Main Owner**\n"
|
||||
"[01]. [runxking](https://discord.com/users/767979794411028491)\n"
|
||||
"[02]. [Ray](https://discord.com/users/870179991462236170)"
|
||||
),
|
||||
"Code Info": (
|
||||
f"**{HEXAHOST_SEARCH} Codebase Overview**\n\n"
|
||||
f"**{AXIOM_SEARCH} Codebase Overview**\n\n"
|
||||
f"Files: **{stats_data['files']}**\n"
|
||||
f"Lines: **{stats_data['lines']}**\n"
|
||||
f"Words: **{stats_data['words']}**"
|
||||
@@ -110,7 +110,7 @@ class StatsView(LayoutView):
|
||||
),
|
||||
discord.SelectOption(
|
||||
label="General Info",
|
||||
emoji=HEXAHOST_GLOBAL,
|
||||
emoji=AXIOM_GLOBAL,
|
||||
description="General info",
|
||||
),
|
||||
discord.SelectOption(
|
||||
@@ -120,7 +120,7 @@ class StatsView(LayoutView):
|
||||
),
|
||||
discord.SelectOption(
|
||||
label="Code Info",
|
||||
emoji=HEXAHOST_SEARCH,
|
||||
emoji=AXIOM_SEARCH,
|
||||
description="Code stats",
|
||||
),
|
||||
],
|
||||
|
||||
@@ -16,11 +16,11 @@ import json
|
||||
import aiosqlite
|
||||
from discord.ext import commands
|
||||
from utils.config import serverLink
|
||||
from core import HexaHost, Cog, Context
|
||||
from core import Axiom, Cog, Context
|
||||
from utils.Tools import get_ignore_data
|
||||
|
||||
class Errors(Cog):
|
||||
def __init__(self, client: HexaHost):
|
||||
def __init__(self, client: Axiom):
|
||||
self.client = client
|
||||
|
||||
@commands.Cog.listener()
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
import discord
|
||||
from utils.emoji import ARROWRED, ZMODULE
|
||||
from discord.utils import *
|
||||
from core import HexaHost, Cog
|
||||
from core import Axiom, Cog
|
||||
from utils.Tools import *
|
||||
from utils.config import BotName, serverLink
|
||||
from discord.ext import commands
|
||||
from discord.ui import Button, View
|
||||
|
||||
class Autorole(Cog):
|
||||
def __init__(self, bot: HexaHost):
|
||||
def __init__(self, bot: Axiom):
|
||||
self.bot = bot
|
||||
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ from utils.db_paths import db_path
|
||||
|
||||
import discord
|
||||
from utils.emoji import ZWARNING
|
||||
from core import HexaHost, Cog
|
||||
from core import Axiom, Cog
|
||||
from discord.ext import commands
|
||||
import aiosqlite
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
class AutoBlacklist(Cog):
|
||||
def __init__(self, client: HexaHost):
|
||||
def __init__(self, client: Axiom):
|
||||
self.client = client
|
||||
self.spam_cd_mapping = commands.CooldownMapping.from_cooldown(5, 5, commands.BucketType.member)
|
||||
self.spam_command_mapping = commands.CooldownMapping.from_cooldown(6, 10, commands.BucketType.member)
|
||||
|
||||
@@ -18,14 +18,14 @@ import aiosqlite
|
||||
import asyncio
|
||||
import logging
|
||||
from discord.ext import commands
|
||||
from core import HexaHost, Cog
|
||||
from core import Axiom, Cog
|
||||
from utils.config import *
|
||||
|
||||
DATABASE_PATH = db_path('autorole.db')
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class Autorole2(Cog):
|
||||
def __init__(self, bot: HexaHost):
|
||||
def __init__(self, bot: Axiom):
|
||||
self.bot = bot
|
||||
self.headers = {"Authorization": f"Bot {self.bot.http.token}"}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from utils.db_paths import db_path
|
||||
from utils import getConfig
|
||||
from utils.config import BotName
|
||||
import discord
|
||||
from utils.emoji import ARROWRED, CODEBASE, HEART3, INDEX, HEXAHOST_LINKS
|
||||
from utils.emoji import ARROWRED, CODEBASE, HEART3, INDEX, AXIOM_LINKS
|
||||
from discord.ui import LayoutView, TextDisplay, Separator, Container, ActionRow, Select
|
||||
from discord.ext import commands
|
||||
from utils.Tools import get_ignore_data
|
||||
@@ -44,7 +44,7 @@ class MentionSelectView(LayoutView):
|
||||
),
|
||||
discord.SelectOption(
|
||||
label="Links",
|
||||
emoji=HEXAHOST_LINKS,
|
||||
emoji=AXIOM_LINKS,
|
||||
description="Useful bot links",
|
||||
),
|
||||
],
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
from discord.ext import commands
|
||||
from core import HexaHost, Cog
|
||||
from core import Axiom, Cog
|
||||
import discord
|
||||
from utils.emoji import ARROWRED, KING, ZBOT, ZHUMAN, ZROCKET
|
||||
import logging
|
||||
@@ -27,7 +27,7 @@ logging.basicConfig(
|
||||
|
||||
|
||||
class Guild(Cog):
|
||||
def __init__(self, client: HexaHost):
|
||||
def __init__(self, client: Axiom):
|
||||
self.client = client
|
||||
self.bot = client
|
||||
self.recently_removed_guilds = set()
|
||||
|
||||
@@ -20,7 +20,7 @@ import typing
|
||||
import typing as t
|
||||
from typing import *
|
||||
from utils.Tools import *
|
||||
from core import Cog, HexaHost, Context
|
||||
from core import Cog, Axiom, Context
|
||||
from discord.ext.commands import Converter
|
||||
from discord.ext import commands, tasks
|
||||
from discord.ui import Button, View
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
# ║ ║
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
from .hexahost import HexaHost
|
||||
from .axiom import Axiom
|
||||
from .Context import Context
|
||||
from .Cog import Cog
|
||||
@@ -34,7 +34,7 @@ extensions: List[str] = [
|
||||
"cogs"
|
||||
]
|
||||
|
||||
class HexaHost(commands.AutoShardedBot):
|
||||
class Axiom(commands.AutoShardedBot):
|
||||
def __init__(self, *arg, **kwargs):
|
||||
intents = discord.Intents.all()
|
||||
intents.presences = True
|
||||
@@ -141,5 +141,5 @@ class HexaHost(commands.AutoShardedBot):
|
||||
|
||||
def setup_bot():
|
||||
intents = discord.Intents.all()
|
||||
bot = HexaHost(intents=intents)
|
||||
bot = Axiom(intents=intents)
|
||||
return bot
|
||||
@@ -17,7 +17,7 @@ from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
TOKEN = os.environ.get("TOKEN")
|
||||
BRAND_NAME = os.environ.get("brand_name", "HexaHost")
|
||||
BRAND_NAME = os.environ.get("brand_name", "Axiom")
|
||||
NAME = BRAND_NAME
|
||||
BotName = BRAND_NAME
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
"""
|
||||
Centralized emoji module for the HexaHost bot.
|
||||
Centralized emoji module for the Axiom bot.
|
||||
All emoji definitions are stored here for easy management and consistency.
|
||||
"""
|
||||
|
||||
@@ -126,15 +126,15 @@ ZTICK = "<:Ztick:1222750301233090600>"
|
||||
ZUNMUTE = "<:zunmute:1448951487970414694>"
|
||||
ZWARNING = "<:zwarning:1448949627712966717>"
|
||||
ZWRENCH = "<:zwrench:1448951382597177495>"
|
||||
HEXAHOST_CONNECTION = "<:zyroxconnection:1448949425828528230>"
|
||||
HEXAHOST_HAMMER = "<:zyroxhammer:1448949447617806458>"
|
||||
HEXAHOST_LINKS = "<:zyroxlinks:1448949436939239495>"
|
||||
HEXAHOST_SYS = "<:zyroxsys:1448949469650620426>"
|
||||
HEXAHOST_CODE = "<:zyrox_code:1448949381436014662>"
|
||||
HEXAHOST_COMMAND = "<:zyrox_command:1448949381436014662>"
|
||||
HEXAHOST_GLOBAL = "<:zyrox_global:1448949370539217026>"
|
||||
HEXAHOST_OWNER = "<:zyrox_owner:1448949381436014662>"
|
||||
HEXAHOST_SEARCH = "<:zyrox_search:1448949381436014662>"
|
||||
AXIOM_CONNECTION = "<:zyroxconnection:1448949425828528230>"
|
||||
AXIOM_HAMMER = "<:zyroxhammer:1448949447617806458>"
|
||||
AXIOM_LINKS = "<:zyroxlinks:1448949436939239495>"
|
||||
AXIOM_SYS = "<:zyroxsys:1448949469650620426>"
|
||||
AXIOM_CODE = "<:zyrox_code:1448949381436014662>"
|
||||
AXIOM_COMMAND = "<:zyrox_command:1448949381436014662>"
|
||||
AXIOM_GLOBAL = "<:zyrox_global:1448949370539217026>"
|
||||
AXIOM_OWNER = "<:zyrox_owner:1448949381436014662>"
|
||||
AXIOM_SEARCH = "<:zyrox_search:1448949381436014662>"
|
||||
|
||||
# ============================================================================
|
||||
# DISCORD CUSTOM EMOJIS (Animated)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
"""
|
||||
HTTPS Tunnel for the HexaHost API — Cloudflare Tunnel via pycloudflared.
|
||||
HTTPS Tunnel for the Axiom API — Cloudflare Tunnel via pycloudflared.
|
||||
|
||||
Zero manual installs. Just:
|
||||
1. pip install pycloudflared (already in requirements.txt)
|
||||
@@ -27,16 +27,16 @@ How to get your CF_TUNNEL_TOKEN (browser only, no CLI needed)
|
||||
1. Go to https://one.dash.cloudflare.com
|
||||
2. Networks → Tunnels → Create a tunnel
|
||||
3. Choose "Cloudflared" as connector type
|
||||
4. Give it a name (e.g. hexahost-api) and click Save
|
||||
4. Give it a name (e.g. axiom-api) and click Save
|
||||
5. On the "Install connector" step, find the token in the command shown:
|
||||
cloudflared tunnel run --token <YOUR_TOKEN_HERE>
|
||||
Copy just the token string.
|
||||
6. Go to "Published Application Routes" tab → Add a Published Application Routes:
|
||||
Subdomain: HexaHost-api Domain: yourdomain.com Service: http://localhost:8000
|
||||
Subdomain: Axiom-api Domain: yourdomain.com Service: http://localhost:8000
|
||||
(Or use any domain you have on Cloudflare)
|
||||
7. Paste the token into your .env:
|
||||
CF_TUNNEL_TOKEN = "eyJhIjoiX..."
|
||||
CF_TUNNEL_URL = "https://hexahost-api.yourdomain.com"
|
||||
CF_TUNNEL_URL = "https://axiom-api.yourdomain.com"
|
||||
|
||||
That's the permanent URL — never changes between restarts.
|
||||
Unlimited bandwidth, unlimited requests, free.
|
||||
@@ -303,7 +303,7 @@ def _run_tunnel(binary: str, token: str, port: int, public_url: str) -> None:
|
||||
def start_tunnel() -> None:
|
||||
"""
|
||||
Start the Cloudflare Tunnel in a background daemon thread.
|
||||
Called from HexaHost.py after keep_alive().
|
||||
Called from Axiom.py after keep_alive().
|
||||
"""
|
||||
if not TUNNEL_ENABLED:
|
||||
print(f"{_YELLOW}◈ Tunnel: disabled via TUNNEL_ENABLED=false{_RESET}")
|
||||
|
||||
Reference in New Issue
Block a user