generated from HoloTech/discord-bot-template
feat(quotes): Add quotes module.
This commit is contained in:
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -7,3 +7,9 @@
|
|||||||
[submodule "src/data"]
|
[submodule "src/data"]
|
||||||
path = src/data
|
path = src/data
|
||||||
url = https://git.thewisewolf.dev/HoloTech/psqlmapper.git
|
url = https://git.thewisewolf.dev/HoloTech/psqlmapper.git
|
||||||
|
[submodule "src/modules/quotes"]
|
||||||
|
path = src/modules/quotes
|
||||||
|
url = git@thewisewolf.dev:Tuxieverse/mrtuxie-quotes-module.git
|
||||||
|
[submodule "src/modules/profiles"]
|
||||||
|
path = src/modules/profiles
|
||||||
|
url = git@thewisewolf.dev:HoloTech/profiles-plugin.git
|
||||||
|
|||||||
2
src/data
2
src/data
Submodule src/data updated: cfdfe0eb50...334b5f5892
@@ -26,6 +26,7 @@ from .monitor import SystemMonitor, ComponentMonitor, StatusLevel, ComponentStat
|
|||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from core.cog import CoreCog
|
from core.cog import CoreCog
|
||||||
|
from modules.profiles.profiles.discord.cog import ProfilesCog
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -64,6 +65,10 @@ class LionBot(Bot):
|
|||||||
def core(self):
|
def core(self):
|
||||||
return self.get_cog('CoreCog')
|
return self.get_cog('CoreCog')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def profiles(self):
|
||||||
|
return self.get_cog('ProfilesCog')
|
||||||
|
|
||||||
async def _monitor_status(self):
|
async def _monitor_status(self):
|
||||||
if self.is_closed():
|
if self.is_closed():
|
||||||
level = StatusLevel.ERRORED
|
level = StatusLevel.ERRORED
|
||||||
@@ -110,6 +115,10 @@ class LionBot(Bot):
|
|||||||
def get_cog(self, name: Literal['CoreCog']) -> 'CoreCog':
|
def get_cog(self, name: Literal['CoreCog']) -> 'CoreCog':
|
||||||
...
|
...
|
||||||
|
|
||||||
|
@overload
|
||||||
|
def get_cog(self, name: Literal['ProfilesCog']) -> 'ProfilesCog':
|
||||||
|
...
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def get_cog(self, name: str) -> Optional[Cog]:
|
def get_cog(self, name: str) -> Optional[Cog]:
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from discord.ext.commands import Context
|
|||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .LionBot import LionBot
|
from .LionBot import LionBot
|
||||||
|
from modules.profiles.profiles.data import UserProfile, Community
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -46,6 +47,8 @@ class LionContext(Context['LionBot']):
|
|||||||
Extends Context to add Lion-specific methods and attributes.
|
Extends Context to add Lion-specific methods and attributes.
|
||||||
Also adds several contextual wrapped utilities for simpler user during command invocation.
|
Also adds several contextual wrapped utilities for simpler user during command invocation.
|
||||||
"""
|
"""
|
||||||
|
profile: 'UserProfile'
|
||||||
|
community: 'Community'
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
parts = {}
|
parts = {}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ this_package = 'modules'
|
|||||||
|
|
||||||
active = [
|
active = [
|
||||||
'.sysadmin',
|
'.sysadmin',
|
||||||
|
'.profiles',
|
||||||
|
'.quotes',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
src/modules/profiles
Submodule
1
src/modules/profiles
Submodule
Submodule src/modules/profiles added at 5fa0df66f5
1
src/modules/quotes
Submodule
1
src/modules/quotes
Submodule
Submodule src/modules/quotes added at d9fa5c4683
Reference in New Issue
Block a user