# Path: redbot/core/data_manager.py
# def load_existing_config():
# def create_temp_config():
# def load_basic_configuration(instance_name_: str):
# def _base_data_path() -> Path:
# def cog_data_path(cog_instance=None, raw_name: str = None) -> Path:
# def core_data_path() -> Path:
# def load_bundled_data(cog_instance, init_location: str):
# def bundled_data_path(cog_instance: commands.Cog) -> Path:
# def storage_type() -> str:
# def storage_details() -> dict:
# 
# Path: redbot/core/data_manager.py
# def storage_type() -> str:
#     """Gets the storage type as a string.
# 
#     Returns
#     -------
#     str
#         Storage type.
#     """
#     try:
#         return basic_config["STORAGE_TYPE"]
#     except KeyError as e:
#         raise RuntimeError("Bot basic config has not been loaded yet.") from e


import asyncio
import contextlib
import datetime
import importlib
import itertools
import keyword
import logging
import io
import random
import markdown
import os
import re
import sys
import platform
import psutil
import getpass
import pip
import traceback
import aiohttp
import discord
            import distro  # pylint: disable=import-error
from pathlib import Path
from redbot.core import data_manager
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
from redbot.core.commands import GuildConverter, RawUserIdConverter
from string import ascii_letters, digits
from typing import TYPE_CHECKING, Union, Tuple, List, Optional, Iterable, Sequence, Dict, Set
from babel import Locale as BabelLocale, UnknownLocaleError
from redbot.core.data_manager import storage_type
from . import (
    __version__,
    version_info as red_version_info,
    checks,
    commands,
    errors,
    i18n,
    bank,
    modlog,
)
from ._diagnoser import IssueDiagnoser
from .utils import AsyncIter
from .utils._internal_utils import fetch_latest_red_version_info
from .utils.predicates import MessagePredicate
from .utils.chat_formatting import (
    box,
    escape,
    humanize_list,
    humanize_number,
    humanize_timedelta,
    inline,
    pagify,
)
from .commands import CommandConverter, CogConverter
from .commands.requires import PrivilegeLevel
    from redbot.core.bot import Red
        from redbot.core.data_manager import basic_config
        from redbot.core.data_manager import basic_config, config_file
        if game:
            await ctx.send(_("Status set to `Playing {game.name}`.").format(game=game))
        else:
            await ctx.send(_("Game cleared."))

    @_set_status.command(name="listening")
    @checks.bot_in_a_guild()
    @checks.is_owner()
    async def _set_status_listening(self, ctx: commands.Context, *, listening: str = None):
        """Sets [botname]'s listening status.

        This will appear as `Listening to <listening>`.

        Maximum length for a listening status is 128 characters.

        **Examples:**
            - `[p]set status listening` - Clears the activity status.
            - `[p]set status listening jams`

        **Arguments:**
            - `[listening]` - The text to follow `Listening to`. Leave blank to clear the current activity status."""

        status = ctx.bot.guilds[0].me.status if len(ctx.bot.guilds) > 0 else discord.Status.online
        if listening:
            if len(listening) > 128:
                await ctx.send(
                    _("The maximum length of listening descriptions is 128 characters.")
                )
                return
            activity = discord.Activity(name=listening, type=discord.ActivityType.listening)

# Path: redbot/core/data_manager.py
# def load_existing_config():
# def create_temp_config():
# def load_basic_configuration(instance_name_: str):
# def _base_data_path() -> Path:
# def cog_data_path(cog_instance=None, raw_name: str = None) -> Path:
# def core_data_path() -> Path:
# def load_bundled_data(cog_instance, init_location: str):
# def bundled_data_path(cog_instance: commands.Cog) -> Path:
# def storage_type() -> str:
# def storage_details() -> dict:
# 
# Path: redbot/core/data_manager.py
# def storage_type() -> str:
#     """Gets the storage type as a string.
# 
#     Returns
#     -------
#     str
#         Storage type.
#     """
#     try:
#         return basic_config["STORAGE_TYPE"]
#     except KeyError as e:
#         raise RuntimeError("Bot basic config has not been loaded yet.") from e


# Path: redbot/core/core_commands.py
import asyncio
import contextlib
import datetime
import importlib
import itertools
import keyword
import logging
import io
import random
import markdown
import os
import re
import sys
import platform
import psutil
import getpass
import pip
import traceback
import aiohttp
import discord
            import distro  # pylint: disable=import-error
from pathlib import Path
from redbot.core import data_manager
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
from redbot.core.commands import GuildConverter, RawUserIdConverter
from string import ascii_letters, digits
from typing import TYPE_CHECKING, Union, Tuple, List, Optional, Iterable, Sequence, Dict, Set
from babel import Locale as BabelLocale, UnknownLocaleError
from redbot.core.data_manager import storage_type
from . import (
    __version__,
    version_info as red_version_info,
    checks,
    commands,
    errors,
    i18n,
    bank,
    modlog,
)
from ._diagnoser import IssueDiagnoser
from .utils import AsyncIter
from .utils._internal_utils import fetch_latest_red_version_info
from .utils.predicates import MessagePredicate
from .utils.chat_formatting import (
    box,
    escape,
    humanize_list,
    humanize_number,
    humanize_timedelta,
    inline,
    pagify,
)
from .commands import CommandConverter, CogConverter
from .commands.requires import PrivilegeLevel
    from redbot.core.bot import Red
        from redbot.core.data_manager import basic_config
        from redbot.core.data_manager import basic_config, config_file

        if game:
            await ctx.send(_("Status set to `Playing {game.name}`.").format(game=game))
        else:
            await ctx.send(_("Game cleared."))

    @_set_status.command(name="listening")
    @checks.bot_in_a_guild()
    @checks.is_owner()
    async def _set_status_listening(self, ctx: commands.Context, *, listening: str = None):
        """Sets [botname]'s listening status.

        This will appear as `Listening to <listening>`.

        Maximum length for a listening status is 128 characters.

        **Examples:**
            - `[p]set status listening` - Clears the activity status.
            - `[p]set status listening jams`

        **Arguments:**
            - `[listening]` - The text to follow `Listening to`. Leave blank to clear the current activity status."""

        status = ctx.bot.guilds[0].me.status if len(ctx.bot.guilds) > 0 else discord.Status.online
        if listening:
            if len(listening) > 128:
                await ctx.send(
                    _("The maximum length of listening descriptions is 128 characters.")
                )
                return
            activity = discord.Activity(name=listening, type=discord.ActivityType.listening)

        else: