Sorted imports and removed unused ones

This commit is contained in:
Profitroll 2023-04-19 14:23:41 +02:00
parent 75c1889477
commit fb3e291d77
6 changed files with 25 additions and 25 deletions

View File

@ -1,5 +1,6 @@
from discord import ApplicationContext, Option, SlashCommandGroup, CategoryChannel
from discord import ApplicationContext, CategoryChannel, Option, SlashCommandGroup
from discord.ext import commands
from functions import (
getMsg,
guildConfGet,

View File

@ -1,14 +1,15 @@
from discord import (
ApplicationContext,
Cog,
Member,
SlashCommandGroup,
VoiceChannel,
Member,
VoiceState,
Cog,
option,
utils,
)
from discord.ext import commands
from functions import (
appendLog,
changeNomicPerms,

View File

@ -1,6 +1,8 @@
from os import listdir
from discord import ApplicationContext, Option, SlashCommandGroup
from discord.ext import commands
from functions import (
appendLog,
getMsg,

View File

@ -1,7 +1,9 @@
from os import getpid, makedirs, system
from shutil import rmtree
from discord import ApplicationContext, slash_command, Cog, Guild
from discord import ApplicationContext, Cog, Guild, slash_command
from discord.ext import commands
from functions import appendLog, getMsg, loadJson, makeEmbed, saveJson, strToColor

View File

@ -1,26 +1,27 @@
from gzip import open as gzipopen
from datetime import datetime
from os import listdir, makedirs, remove, stat, path
from gzip import open as gzipopen
from os import listdir, makedirs, path, remove, stat
from shutil import copyfileobj
from typing import Any, Literal, Union
from discord import (
utils,
ApplicationContext,
CategoryChannel,
Client,
Embed,
Guild,
Member,
Message,
PermissionOverwrite,
TextChannel,
VoiceChannel,
PermissionOverwrite,
Guild,
CategoryChannel,
Member,
Client,
ApplicationContext,
Message,
utils,
)
try:
from ujson import loads, dumps
from ujson import dumps, loads
except ImportError:
from json import loads, dumps
from json import dumps, loads
# path = Path(__file__).resolve().parent

View File

@ -1,13 +1,6 @@
try:
from discord import Activity, ActivityType, ApplicationContext, Bot, Intents
from requests import get
from discord import (
ApplicationContext,
Intents,
Bot,
ActivityType,
Activity,
VoiceState,
)
except Exception as exp:
print(
f"Dependencies not installed. Make sure to run 'pip install -r requirements.txt' before first start"
@ -15,7 +8,7 @@ except Exception as exp:
exit()
from os import getpid
from shutil import rmtree
from functions import *
pid = getpid()