Skip to content

Commit 365f37f

Browse files
committed
fix: 썸네일 없으면 추가안되는 버그
1 parent 34565f1 commit 365f37f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/Admin.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ async def 곡추가(self, action: Interaction[DamiBot], title: str, dlc: str, a
102102
if image_file:
103103
embed.set_thumbnail(url="attachment://thumbnail.jpg")
104104
utils.reset_singleton(MusicManager)
105-
await action.response.send_message(embed=embed, file=image_file)
105+
106+
if image_file:
107+
await action.response.send_message(embed=embed, file=image_file)
108+
else:
109+
await action.response.send_message(embed=embed)
110+
106111

107112
@app_commands.command(description='DJMAX RESPECT V의 수록곡을 삭제합니다.')
108113
@app_commands.describe(title="곡명", dlc="DLC")
@@ -161,7 +166,7 @@ async def 세부난이도추가(self, action: Interaction[DamiBot], title: str,
161166
insert += 1
162167

163168
session.commit()
164-
await action.response.send_message(f"✅ {music.music_name} ({music.music_dlc})에 대한 세부 난이도가 추가되었습니다.\n> 추가 ({insert}) / 수정 ({update}")
169+
await action.response.send_message(f"✅ {music.music_name} ({music.music_dlc})에 대한 세부 난이도가 추가되었습니다.\n> 추가 ({insert}) / 수정 ({update})")
165170

166171

167172
async def setup(bot):

0 commit comments

Comments
 (0)