From 466fe36a30d3df5d353c0c5700df078e37926e9d Mon Sep 17 00:00:00 2001 From: qwewqa <198e559dbd446d973355f415bdfa34@gmail.com> Date: Sat, 6 Feb 2021 13:43:19 -0500 Subject: [PATCH] update import paths --- export_assets.py | 4 +--- main.py | 4 ++-- miyu_bot/bot/bot.py | 2 +- miyu_bot/bot/master_asset_manager.py | 2 +- miyu_bot/bot/name_aliases.py | 2 +- miyu_bot/commands/cogs/music.py | 3 ++- miyu_bot/commands/cogs/utility.py | 2 ++ update_assets.py | 4 ++-- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/export_assets.py b/export_assets.py index 542a049..4e613ae 100644 --- a/export_assets.py +++ b/export_assets.py @@ -1,9 +1,7 @@ import shutil -from pathlib import Path -from d4dj_utils.manager.asset_manager import AssetManager +from d4dj_utils.master.asset_manager import AssetManager -from miyu_bot.bot.master_asset_manager import hash_master from miyu_bot.commands.common.asset_paths import * diff --git a/main.py b/main.py index 4a19814..81d0c4b 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,7 @@ import json import logging import discord -from d4dj_utils.manager.asset_manager import AssetManager +from d4dj_utils.master.asset_manager import AssetManager from miyu_bot.bot.bot import D4DJBot from miyu_bot.bot.master_asset_manager import MasterFilterManager @@ -13,7 +13,7 @@ with open('config.json') as f: bot_token = json.load(f)['token'] asset_manager = AssetManager('assets') -bot = D4DJBot(asset_manager, MasterFilterManager(asset_manager), command_prefix='!', case_insensitive=True, +bot = D4DJBot(asset_manager, MasterFilterManager(asset_manager), command_prefix='?', case_insensitive=True, activity=discord.Game(name='https://discord.gg/TThMwrAZTR')) bot.load_extension('miyu_bot.commands.cogs.card') diff --git a/miyu_bot/bot/bot.py b/miyu_bot/bot/bot.py index ecf8254..c55cd40 100644 --- a/miyu_bot/bot/bot.py +++ b/miyu_bot/bot/bot.py @@ -1,4 +1,4 @@ -from d4dj_utils.manager.asset_manager import AssetManager +from d4dj_utils.master.asset_manager import AssetManager from discord.ext import commands from miyu_bot.bot.master_asset_manager import MasterFilterManager diff --git a/miyu_bot/bot/master_asset_manager.py b/miyu_bot/bot/master_asset_manager.py index 8819776..9f2d4f5 100644 --- a/miyu_bot/bot/master_asset_manager.py +++ b/miyu_bot/bot/master_asset_manager.py @@ -1,7 +1,7 @@ import hashlib from typing import Callable, Any, Optional, Union -from d4dj_utils.manager.asset_manager import AssetManager +from d4dj_utils.master.asset_manager import AssetManager from d4dj_utils.master.event_master import EventMaster, EventState from d4dj_utils.master.master_asset import MasterDict, MasterAsset from discord.ext import commands diff --git a/miyu_bot/bot/name_aliases.py b/miyu_bot/bot/name_aliases.py index 72a4ed6..6dbd668 100644 --- a/miyu_bot/bot/name_aliases.py +++ b/miyu_bot/bot/name_aliases.py @@ -1,6 +1,6 @@ from functools import cached_property -from d4dj_utils.manager.asset_manager import AssetManager +from d4dj_utils.master.asset_manager import AssetManager class NameAliases: diff --git a/miyu_bot/commands/cogs/music.py b/miyu_bot/commands/cogs/music.py index 27c6694..5040d8e 100644 --- a/miyu_bot/commands/cogs/music.py +++ b/miyu_bot/commands/cogs/music.py @@ -235,7 +235,8 @@ class Music(commands.Cog): f'Duration: {self.format_duration(self.get_music_duration(song))}\n' f'Unit: {song.special_unit_name or song.unit.name}\n' f'Category: {song.category.name}\n' - f'BPM: {song.bpm}', + f'BPM: {song.bpm}\n' + f'Designer: {chart.designer.name}', inline=False) embed.add_field(name='Combo', value=f'Max Combo: {chart.note_counts[ChartSectionType.Full].count}\n' diff --git a/miyu_bot/commands/cogs/utility.py b/miyu_bot/commands/cogs/utility.py index 2bea268..bf91a76 100644 --- a/miyu_bot/commands/cogs/utility.py +++ b/miyu_bot/commands/cogs/utility.py @@ -40,6 +40,8 @@ class Utility(commands.Cog): **globals(), } + self.bot.asset_filters.cards.default_filter + if body and body[0] == '`' and body[-1] == '`': body = body[1:-1] diff --git a/update_assets.py b/update_assets.py index 2a88d09..5126c71 100644 --- a/update_assets.py +++ b/update_assets.py @@ -2,8 +2,8 @@ import asyncio import logging import logging.config -from d4dj_utils.manager.asset_manager import AssetManager -from d4dj_utils.manager.revision_manager import RevisionManager +from d4dj_utils.master.asset_manager import AssetManager +from d4dj_utils.extended.manager.revision_manager import RevisionManager async def main():