From 38a7d568f73e0c1eba54803720e75ec46d79ba31 Mon Sep 17 00:00:00 2001 From: ZRunner Date: Wed, 4 Oct 2023 17:16:04 -0400 Subject: [PATCH] refact(files): add new folder at root --- src/modules/admin/main.py | 2 +- src/modules/giveaways/main.py | 4 ++-- src/{ => utils}/checks.py | 5 ++--- src/{ => utils}/confirm_view.py | 0 src/{ => utils}/custom_args.py | 0 5 files changed, 5 insertions(+), 6 deletions(-) rename src/{ => utils}/checks.py (78%) rename src/{ => utils}/confirm_view.py (100%) rename src/{ => utils}/custom_args.py (100%) diff --git a/src/modules/admin/main.py b/src/modules/admin/main.py index 19f7ea9..9cdfc98 100644 --- a/src/modules/admin/main.py +++ b/src/modules/admin/main.py @@ -14,7 +14,7 @@ from git import GitCommandError from git.repo import Repo -from src.checks import is_bot_admin +from src.utils.checks import is_bot_admin from src.cobot import CObot, COInteraction diff --git a/src/modules/giveaways/main.py b/src/modules/giveaways/main.py index 0fe3132..6d67abf 100644 --- a/src/modules/giveaways/main.py +++ b/src/modules/giveaways/main.py @@ -10,8 +10,8 @@ from discord.ext import commands, tasks from src.cobot import CObot, COInteraction -from src.confirm_view import ConfirmView -from src.custom_args import ColorOption, DurationOption +from src.utils.confirm_view import ConfirmView +from src.utils.custom_args import ColorOption, DurationOption from src.modules.giveaways.types import GiveawayData, GiveawayToSendData from src.modules.giveaways.views import GiveawayView diff --git a/src/checks.py b/src/utils/checks.py similarity index 78% rename from src/checks.py rename to src/utils/checks.py index 1105dcf..63cb105 100644 --- a/src/checks.py +++ b/src/utils/checks.py @@ -1,6 +1,5 @@ -from .cobot import COInteraction - +from src.cobot import COInteraction async def is_bot_admin(interaction: COInteraction) -> bool: """Check if the user is a bot admin.""" - return interaction.user.id in interaction.client.config["ADMIN_IDS"] \ No newline at end of file + return interaction.user.id in interaction.client.config["ADMIN_IDS"] diff --git a/src/confirm_view.py b/src/utils/confirm_view.py similarity index 100% rename from src/confirm_view.py rename to src/utils/confirm_view.py diff --git a/src/custom_args.py b/src/utils/custom_args.py similarity index 100% rename from src/custom_args.py rename to src/utils/custom_args.py