diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 1033e12..35f26e0 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,9 @@
-
+
+
@@ -112,7 +113,8 @@
-
+
+
1662545492088
@@ -149,7 +151,14 @@
1662898384606
-
+
+ 1662934101339
+
+
+
+ 1662934101339
+
+
@@ -172,20 +181,21 @@
-
+
+
file://$PROJECT_DIR$/main.py
- 49
+ 52
-
+
\ No newline at end of file
diff --git a/config.py b/config.py
index ba39081..a23597f 100644
--- a/config.py
+++ b/config.py
@@ -1 +1,2 @@
+
TOKEN = '5631324818:AAEcOp7ZPzeSQReLk7rwnAT89n76ld05Jko' # bot token
\ No newline at end of file
diff --git a/main.py b/main.py
index 09fbfbe..e4f4f0e 100644
--- a/main.py
+++ b/main.py
@@ -3,6 +3,9 @@ import telebot
import ipaddress
bot = telebot.TeleBot(config.TOKEN)
+@bot.message_handler(commands=['start'])
+def start(message):
+ bot.send_message(message.chat.id, 'Привет')
def main(ip):
list_ip = ip.split('/') # Разделяет вводимый ip на часть с маской, и без
@@ -42,6 +45,7 @@ def subnets(ip, prefix):
if __name__ == '__main__':
+ bot.polling(none_stop=True)
addr = input('Введите ip: ') # Пользователь вводит ip
main(addr)
# Тут должна быть кнопка типа "Подсети"