diff --git a/bot.py b/bot.py index b7899cb..a359118 100755 --- a/bot.py +++ b/bot.py @@ -75,7 +75,7 @@ async def _cog_opt(inter: disnake.ApplicationCommandInteraction, current: str, w @slash_cogs.error async def cogs_error(inter, what_do): - await inter.response.send_message(f'Error', ephemeral=True) + await inter.response.send_message('Error', ephemeral=True) logger.error(f'User {inter.author} tries to use cogs func\n{what_do}\n') diff --git a/cogs/general.py b/cogs/general.py index 18f2d86..ea295d2 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -50,8 +50,8 @@ class General(commands.Cog): value=f"Username: {user}\n" f"Nickname: {user.nick}\n" f"Joined at: {user.joined_at.strftime('%A, %B %d %Y @ %H:%M:%S')}", inline=False) - emb.add_field(name="Default audio list", value=f"{audios}", inline=True) - emb.add_field(name="Roles list", value=f"{roles}", inline=True) + emb.add_field(name="Default audio list", value=f"{audios}") + emb.add_field(name="Roles list", value=f"{roles}") emb.set_footer(text="Information requested by: {}".format(inter.author.display_name)) await inter.response.send_message(embed=emb, ephemeral=True) diff --git a/lib/Comands.py b/lib/Comands.py index 026aae2..f3a99f5 100644 --- a/lib/Comands.py +++ b/lib/Comands.py @@ -39,7 +39,7 @@ async def read_json(guild: int, _param: str): :return: value of parameter. """ parameter = None - with open(os.getenv('CONF_FILE'), 'r', encoding='utf-8') as f: # Open the JSON + with open(os.getenv('CONF_FILE'), encoding='utf-8') as f: # Open the JSON try: _json = json.load(f) # Load the custom prefixes except json.decoder.JSONDecodeError: @@ -57,7 +57,7 @@ async def read_json(guild: int, _param: str): async def write_json(guild: int, param_name: str, param: str or int): - with open(os.getenv('CONF_FILE'), 'r', encoding='utf-8') as f: + with open(os.getenv('CONF_FILE'), encoding='utf-8') as f: try: _json = json.load(f) except json.decoder.JSONDecodeError: @@ -80,7 +80,7 @@ def determine_prefix(bot, msg): :return: prefix for server, default is $ """ parameter = '$' - with open(os.getenv('CONF_FILE'), 'r', encoding='utf-8') as f: # Open the JSON + with open(os.getenv('CONF_FILE'), encoding='utf-8') as f: # Open the JSON try: _json = json.load(f) # Load the custom prefixes except json.JSONDecodeError: @@ -100,7 +100,7 @@ def determine_time(msg): :return: prefix for server, default is $ """ parameter = 15 - with open(os.getenv('CONF_FILE'), 'r', encoding='utf-8') as f: # Open the JSON + with open(os.getenv('CONF_FILE'), encoding='utf-8') as f: # Open the JSON try: _json = json.load(f) # Load the custom prefixes except json.JSONDecodeError: diff --git a/lib/Logger.py b/lib/Logger.py index 9f7f127..f1f98be 100644 --- a/lib/Logger.py +++ b/lib/Logger.py @@ -7,7 +7,7 @@ class _CustomFormatter(logging.Formatter): red = "\x1b[31;20m" bold_red = "\x1b[31;1m" reset = "\x1b[0m" - format = f"%(asctime)s - [%(levelname)s] -%(module)s- %(message)s" + format = "%(asctime)s - [%(levelname)s] -%(module)s- %(message)s" FORMATS = { logging.DEBUG: grey + format + reset, diff --git a/lib/Player.py b/lib/Player.py index 1a1a1b8..02373cb 100644 --- a/lib/Player.py +++ b/lib/Player.py @@ -10,7 +10,7 @@ async def play_audio(audio, bot, vc): await sleep(1) vp = await vc.connect() if not vp.is_playing(): - vp.play(FFmpegOpusAudio(f'{audio}', executable='ffmpeg'), after=lambda e: print('done', e)) + vp.play(FFmpegOpusAudio(f'{audio}'), after=lambda e: print('done', e)) while vp.is_playing(): await sleep(0.5) await sleep(1) diff --git a/lib/__init__.py b/lib/__init__.py index cdc88f4..92e4610 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -1,7 +1,7 @@ """ lib ~~~~~~~~~~~~~ -Some libs for the bot whitch help him +Some libs for the bot which help him """ from .ListGenerator import * from .Logger import * diff --git a/test.py b/test.py index b2641b4..6ba19c8 100644 --- a/test.py +++ b/test.py @@ -2,4 +2,4 @@ from lib import ListGenerator for i in ListGenerator('audio'): print(i.__repr__()) - print(f"{i.path}/{i.name}") \ No newline at end of file + print(f"{i.path}/{i.name}")