This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import logging | |
from aiogram import Bot, Dispatcher | |
from aiogram.types import BotCommand | |
from bot.config_reader import load_config | |
from bot.middlewares.config import ConfigMiddleware | |
from bot.handlers.main_group_events import register_group_events | |
from bot.handlers.callbacks_reports import register_callbacks_reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</script> | |
</head> | |
<body> | |
<div id="app"> | |
</div> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
WARNING!!!! | |
This code doesn't work anymore and cannot be fixed at all. | |
See https://github.com/LonamiWebs/Telethon/issues/1723 for more info | |
""" | |
import re | |
import struct | |
import base64 | |
import binascii |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from aiogram import Bot, Dispatcher, executor, types | |
from aiogram.dispatcher.filters import Filter | |
logging.basicConfig(level=logging.INFO) | |
bot = Bot(token="") | |
dp = Dispatcher(bot) | |
admins = set() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import shlex | |
from aiogram import Bot | |
from json import loads, dumps | |
# Suppress DeprecationWarning from close() method | |
import logging | |
logging.captureWarnings(True) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Telegram-казино | |
# Этот код позволяет понять, какие именно значения выпали в дайсе "казино" по тому, что вернул Bot API | |
# Авторы: @Groosha, @svinerus | 2020 год | |
### | |
from typing import List | |
# 0 1 2 3 | |
casino = ["BAR", "виноград", "лимон", "семь"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any, Dict, List, Set | |
from aiogram import types | |
from aiogram.dispatcher.handler import CancelHandler | |
from aiogram.dispatcher.middlewares import BaseMiddleware | |
from loguru import logger | |
class WhitelistMiddleware(BaseMiddleware): | |
def __init__(self, users: Set[int]): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Здесь будут куски кода к 14-му уроку моего учебника |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a piece of code how Commit and Revert (reset) are called | |
// m_Git is a TGitClient instance | |
void main() { | |
const auto commitMessage = "Some commit message"; | |
std::string commitError; | |
if(!m_Git.MakeCommitToRepo(commitError, commitMessage)) { | |
std::cout << "MakeCommit returned error: " << commitError << std::endl; | |
} | |
std::cout << "Commited\n"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a list of your own shortcuts for Telegram Desktop | |
// You can see full list of commands in the 'shortcuts-default.json' file | |
// Place a null value instead of a command string to switch the shortcut off | |
[ | |
// The two commands below are "inactive" | |
// { | |
// "command": "close_telegram", | |
// "keys": "ctrl+f4" | |
// }, |
NewerOlder