GithubHelp home page GithubHelp logo

не понимаю about sshuttle HOT 2 OPEN

replicatedublos avatar replicatedublos commented on September 25, 2024
не понимаю

from sshuttle.

Comments (2)

replicatedublos avatar replicatedublos commented on September 25, 2024

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.

brianmay avatar brianmay commented on September 25, 2024

Not sure how this is related to sshuttle...

from sshuttle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.