From 8f3785a17cc4ec3272154b30783ab97681ade576 Mon Sep 17 00:00:00 2001 From: Choco <94597336+ChocoMeow@users.noreply.github.com> Date: Wed, 12 Apr 2023 17:17:29 +0800 Subject: [PATCH] Fix some bugs --- cogs/playlist.py | 2 +- langs/DE.json | 2 +- web/ipc/methods.py | 3 ++- web/static/js/action.js | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cogs/playlist.py b/cogs/playlist.py index 796255d..f0ed204 100644 --- a/cogs/playlist.py +++ b/cogs/playlist.py @@ -220,7 +220,7 @@ class Playlists(commands.Cog, name="playlist"): data = {'uri': link, 'perms': {'read': []}, 'name': name, 'type': 'link'} if isLinkType else { 'tracks': [], 'perms': {'read': [], 'write': [], 'remove': []}, 'name': name, 'type': 'playlist'} await update_playlist(ctx.author.id, {f"playlist.{assign_playlistId([data for data in user])}": data}) - await ctx.send(get_lang(ctx.guild.id, 'playlistCreated')) + await ctx.send(get_lang(ctx.guild.id, 'playlistCreated').format(name)) @playlist.command(name="delete", aliases=get_aliases("delete")) @app_commands.describe(name="The name of the playlist.") diff --git a/langs/DE.json b/langs/DE.json index 226c27a..4043e43 100644 --- a/langs/DE.json +++ b/langs/DE.json @@ -67,7 +67,7 @@ "overPlaylistCreation": "Sie können nicht mehr als `{0}` Wiedergabelisten erstellen!", "playlistExists": "Playlist [`{0}`] existiert bereits.", "playlistNotInvaildUrl": "Bitte geben Sie einen gültigen Link oder öffentlichen Spotify- oder YouTube-Playlist-Link ein.", - "playlistCreated": "Sie haben die Wiedergabeliste „{0}“ erstellt. Geben Sie /playlist view ein, um weitere Informationen zu erhalten.", + "playlistCreated": "Sie haben die Wiedergabeliste `{0}` erstellt. Geben Sie /playlist view ein, um weitere Informationen zu erhalten.", "playlistRenamed": "Sie haben `{0}` in `{1}` umbenannt.", "playlistLimitTrack": "Sie haben die Grenze erreicht! Du kannst deiner Playlist nur `{0}` Songs hinzufügen.", "playlistPlaylistLink": "Sie dürfen keinen Playlist-Link verwenden.", diff --git a/web/ipc/methods.py b/web/ipc/methods.py index a540e3b..7a23c93 100644 --- a/web/ipc/methods.py +++ b/web/ipc/methods.py @@ -265,8 +265,9 @@ async def process_methods(websocket, bot: commands.Bot, data: dict) -> None: return player: Player = guild.voice_client - if not player or not Member: + if not player or not member: return + try: resp: dict = await method(player, member, data) if resp: diff --git a/web/static/js/action.js b/web/static/js/action.js index 660363a..5bc39a5 100644 --- a/web/static/js/action.js +++ b/web/static/js/action.js @@ -22,8 +22,8 @@ $(document).ready(function () { $(".thumbnail-background").css({ "background": `linear-gradient(-132deg, ${colors[0]}, ${colors[1]}, ${colors[2]}, ${colors[3]})`, "width": "70%", - "padding-bottom": "70%" - }) + "padding-bottom": "70%", + }); }) .catch(error => { return });