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 discord.ext import commands
from functions import ( from functions import (
getMsg, getMsg,
guildConfGet, guildConfGet,

View File

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

View File

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

View File

@ -1,7 +1,9 @@
from os import getpid, makedirs, system from os import getpid, makedirs, system
from shutil import rmtree 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 discord.ext import commands
from functions import appendLog, getMsg, loadJson, makeEmbed, saveJson, strToColor 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 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 shutil import copyfileobj
from typing import Any, Literal, Union from typing import Any, Literal, Union
from discord import ( from discord import (
utils, ApplicationContext,
CategoryChannel,
Client,
Embed, Embed,
Guild,
Member,
Message,
PermissionOverwrite,
TextChannel, TextChannel,
VoiceChannel, VoiceChannel,
PermissionOverwrite, utils,
Guild,
CategoryChannel,
Member,
Client,
ApplicationContext,
Message,
) )
try: try:
from ujson import loads, dumps from ujson import dumps, loads
except ImportError: except ImportError:
from json import loads, dumps from json import dumps, loads
# path = Path(__file__).resolve().parent # path = Path(__file__).resolve().parent

View File

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