Skip to content

Commit

Permalink
feat: sane defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Apr 24, 2022
1 parent aca4d50 commit 3000e3d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion botbase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .checks import *


__version__ = "1.12.4"
__version__ = "1.13.0"


getLogger(__name__).addHandler(NullHandler())
18 changes: 13 additions & 5 deletions botbase/botbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
from importlib import import_module
from logging import CRITICAL, INFO, Formatter, getLogger
from logging.handlers import RotatingFileHandler
from random import choice
from textwrap import dedent
from typing import TYPE_CHECKING
from random import choice

import jishaku
from aiohttp import ClientSession
from asyncpg import create_pool
from nextcord import Embed, Member, Thread, User, abc, Interaction
from nextcord import Embed, Interaction, Member, Thread, User, abc
from nextcord.ext.commands import Bot, when_mentioned_or

from .blacklist import Blacklist
from .emojis import Emojis
from .wraps import (
MyContext,
MyInter,
WrappedChannel,
WrappedMember,
WrappedThread,
WrappedUser,
MyInter,
)

if TYPE_CHECKING:
Expand Down Expand Up @@ -54,8 +54,16 @@ class BotBase(Bot):

def __init__(self, *args, config_module: str = "config", **kwargs) -> None:
pre = kwargs.pop("command_prefix", self.get_pre)

super().__init__(*args, command_prefix=pre, **kwargs)
saf = kwargs.pop("strip_after_prefix", True)
ca = kwargs.pop("case_insensitive", True)

super().__init__(
*args,
command_prefix=pre,
strip_after_prefix=saf,
case_insensitive=ca,
**kwargs,
)

self.prefix: dict[int, list[str]] = {}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ooliver-botbase"
version = "1.12.4"
version = "1.13.0"
description = "A personal nextcord bot base package for bots."
authors = ["ooliver1 <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 3000e3d

Please sign in to comment.