@@ -47,12 +47,15 @@ async def get_home_ip(interaction):
4747 '❌ Błędna konfiguracja serwera, nie jesteś administratorem!' ,
4848 ephemeral = True ,
4949 )
50- elif interaction .user .id != config .get ('owner_bot_id' ):
50+ if interaction .user .id != config .get ('owner_bot_id' ):
5151 return await interaction .response .send_message (
5252 '❌ Ta komenda jest tylko dla właściciela bota.' ,
5353 ephemeral = True ,
5454 )
5555
56+ # odroczenie odpowiedzi
57+ await interaction .response .defer (ephemeral = True )
58+
5659 try :
5760 async with aiohttp .ClientSession () as session :
5861 async with session .get ('https://api.ipify.org' ) as r :
@@ -63,14 +66,20 @@ async def get_home_ip(interaction):
6366 ephemeral = True ,
6467 )
6568
69+ await interaction .followup .send (
70+ '📨 IP zostało wysłane w prywatnej wiadomości.' ,
71+ ephemeral = True ,
72+ )
73+
6674 try :
75+ await interaction .user .send (
76+ f"Publiczny adres piwnicy w Gutkowie to { public_ip } "
77+ )
78+ except :
6779 await interaction .followup .send (
68- 'Zwrócono adres IP w prywatnej wiadomości.' ,
69- ephemeral = True ,
80+ "❌ Nie udało się wysłać wiadomości prywatnej." ,
81+ ephemeral = True
7082 )
71- await interaction .user .send (f"Publiczny adres piwnicy w Gutkowie to { public_ip } " )
72- except Exception as e :
73- pass
7483
7584@tree .command (description = 'Kenify input to SerialCord' )
7685async def kenify (interaction , msg : str ):
0 commit comments