Skip to content

Commit

Permalink
Fuck command tree
Browse files Browse the repository at this point in the history
  • Loading branch information
tookender committed Aug 25, 2023
1 parent 15386e5 commit 4e6c921
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions utils/subclasses/bot.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import datetime
import logging
import pathlib
from typing import Self

import discord
import mystbin as mystbin_library
from aiohttp import ClientSession
from asyncpg import Pool
from discord.ext import commands
from .tree import CommandTree

# from .tree import MyCommandTree

class Korii(commands.AutoShardedBot):
user: discord.ClientUser
Expand All @@ -27,7 +25,7 @@ def __init__(self, session: ClientSession, pool: Pool, **kwargs) -> None:
description="A multi-purpose bot with swag 😎\n" "**Website:** https://bot.korino.xyz\n" "**Docs:** https://bot.korino.xyz/docs",
intents=discord.Intents.all(),
allowed_mentions=discord.AllowedMentions.none(),
tree_cls=CommandTree,
# tree_cls=MyCommandTree,
)

self.maintenace = False
Expand Down
4 changes: 1 addition & 3 deletions utils/subclasses/tree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# https://gist.github.com/Soheab/fed903c25b1aae1f11a8ca8c33243131

from __future__ import annotations
from typing import Dict, Optional, List, TYPE_CHECKING, Union

Expand All @@ -12,7 +10,7 @@
AppCommandStore = Dict[str, app_commands.AppCommand] # name: AppCommand


class CommandTree(app_commands.CommandTree):
class MyCommandTree(app_commands.CommandTree):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self._global_app_commands: AppCommandStore = {}
Expand Down

0 comments on commit 4e6c921

Please sign in to comment.