blob: ae2036b737023993759c5e70a10fe814a6cbd81d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import pkgutil
from collections.abc import Iterator
from pydis_core.utils.logging import get_logger
__all__ = ("get_package_names",)
log = get_logger(__name__)
def get_package_names() -> Iterator[str]:
"""Iterate names of all packages located in /bot/exts/."""
for package in pkgutil.iter_modules(__path__):
if package.ispkg:
yield package.name
|