Skip to content

Commit 15741a8

Browse files
committed
Fixes (at least)
1 parent bac7c4e commit 15741a8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

misc/SerialCord/main.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ async def on_ready():
4242

4343
@tree.command(description='Pokaż publiczny adres IP (tylko właściciel)')
4444
async def get_home_ip(interaction):
45-
if config.get('bot_owner_id') and interaction.user.id != config.get('bot_owner_id'):
45+
if not config.get('owner_bot_id'):
46+
return await interaction.response.send_message(
47+
'Ojojoj, błędna konfiguracja :(',
48+
)
49+
elif interaction.user.id != config.get('bot_owner_id'):
4650
return await interaction.response.send_message(
4751
'❌ Ta komenda jest tylko dla właściciela bota.',
4852
ephemeral=True,
@@ -62,10 +66,7 @@ async def get_home_ip(interaction):
6266
await interaction.response.send_message('Wykonano poproszoną akcję.',)
6367
await interaction.user.send(f"Publiczny adres piwnicy w Gutkowie to {public_ip}")
6468
except Exception as e:
65-
await interaction.followup.send(
66-
f'❌ Nie mogłem wysłać DM: {e}',
67-
ephemeral=True,
68-
)
69+
pass
6970

7071
@tree.command(description='Kenify input to SerialCord')
7172
async def kenify(interaction, msg: str):

0 commit comments

Comments
 (0)