Comments (2)
import logging
from aiogram import Bot, types
from aiogram.dispatcher import Dispatcher
from aiogram.utils import executor
import markups as nav
from db import Database
TOKEN = "5730827563:AAHSQf_s-ltRVIqt4FL9oFzwVx22D8FNUh8"
logging.basicConfig(level=logging.INFO)
bot = Bot(token=TOKEN)
dp = Dispatcher(bot)
db = Database('database.db')
@dp.message_handler(commands=['start'])
async def start(message: types.Message):
if(not db.user_exists(message.from_user.id)):
db.add_user(message.from_user.id)
await bot.send_message(message.from_user.id, "Пожалуйста,Укажите ваш nickname")
else:
await bot.send_message(message.from_user.id, "Вы уже зарегистрированы!", reply_markup=nav.mainMenu)
@dp.message_handler()
async def bot_message(message: types.Message):
if message.chat.type == 'private':
if message.text == '📖 ПРОФИЛЬ':
pass
else:
if db.get_signup(message.from_user.id) == "setnickname":
if(len(message.text) > 15):
await bot.send_message(message.from_user.id, "Никнейм не должен привышать 15 символов!")
elif '@' in message.text or '/' in message.text:
await bot.send_message(message.from_user.id, "Вы ввели запрещённый символ!")
else:
db.set_nickname(message.from_user.id, message.text)
db.set_signup(message.from_user.id, "done")
await bot.send_message(message.from_user.id, "Регистрация прошла успешно!", reply_markup=nav.mainMenu)
else:
await bot.send_message(message.from_user.id, "Мы не понимаем чего вы хотите!")
if name == "main":
executor.start_polling(dp, skip_updates = True)
from sshuttle.
Not sure how this is related to sshuttle...
from sshuttle.
Related Issues (20)
- Sshuttle 1.1.1 not working on macOS Sonoma 14.1.1 HOT 8
- sshuttle fails when different sudo message appears.
- feature request: tunnel by process uid or gid
- Allowing local access to more specific local routes
- Why I can't connect to a remote VPS ? HOT 4
- cant open another ssh connection with sshuttle running
- Nix build fails to poetry2nix lacking cryptography 42.0.4 hash HOT 1
- Would addition of --no-custom-ssh-cmd allow a secure configuration in sudoers file HOT 1
- Installed sshuttle in a Conda environment on remote - unable to connect
- c : fatal: ssh connection to server exited with returncode 255 HOT 2
- Does sshuttle have requirements for server operating system? HOT 9
- webRTC IP leak with sshutle on HOT 1
- Domain names should be resolved on the remote host if `--dns` is specified
- Is the transparent proxy single side? HOT 1
- README.md intro text
- Sshuttle 1.1.2 not working on macOS Sequoia Developer Beta 15.0 HOT 13
- Issue When Using sshuttle with Windows HOT 1
- Usernames with colons are wrongly parsed HOT 1
- Running on rooted Android device via Termux
- 1.1.2 doesn't work on windows: ModuleNotFoundError: No module named 'fcntl' HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sshuttle.