From 545d470e02c52f078d4171d75684db3c17a7fc66 Mon Sep 17 00:00:00 2001 From: gurland Date: Sat, 2 Jun 2018 00:54:23 +0300 Subject: [PATCH] Convert tabs to spaces --- docs/Makefile | 4 ++-- docs/source/quick_start.rst | 40 ++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 4e50ed99..d4bd90d4 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -10,11 +10,11 @@ BUILDDIR = build # Put it first so that "make" without argument is like "make help". help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/source/quick_start.rst b/docs/source/quick_start.rst index 9f35c45a..6ce619be 100644 --- a/docs/source/quick_start.rst +++ b/docs/source/quick_start.rst @@ -8,9 +8,9 @@ At first you have to import all necessary modules .. code-block:: python3 - from aiogram import Bot, types - from aiogram.dispatcher import Dispatcher - from aiogram.utils import executor + from aiogram import Bot, types + from aiogram.dispatcher import Dispatcher + from aiogram.utils import executor Then you have to initialize bot and dispatcher instances. Bot token you can get from `@BotFather `_ @@ -18,39 +18,39 @@ Bot token you can get from `@BotFather `_ .. code-block:: python3 - bot = Bot(token='BOT TOKEN HERE') - dp = Dispatcher(bot) + bot = Bot(token='BOT TOKEN HERE') + dp = Dispatcher(bot) Next step: interaction with bots starts with one command. Register your first command handler: .. code-block:: python3 - @dp.message_handler(commands=['start', 'help']) - async def send_welcome(message: types.Message): - await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.") + @dp.message_handler(commands=['start', 'help']) + async def send_welcome(message: types.Message): + await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.") Last step: run long polling. .. code-block:: python3 - if __name__ == '__main__': - executor.start_polling(dp) + if __name__ == '__main__': + executor.start_polling(dp) Summary ------- .. code-block:: python3 - from aiogram import Bot, types - from aiogram.dispatcher import Dispatcher - from aiogram.utils import executor + from aiogram import Bot, types + from aiogram.dispatcher import Dispatcher + from aiogram.utils import executor - bot = Bot(token='BOT TOKEN HERE') - dp = Dispatcher(bot) + bot = Bot(token='BOT TOKEN HERE') + dp = Dispatcher(bot) - @dp.message_handler(commands=['start', 'help']) - async def send_welcome(message: types.Message): - await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.") + @dp.message_handler(commands=['start', 'help']) + async def send_welcome(message: types.Message): + await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.") - if __name__ == '__main__': - executor.start_polling(dp) + if __name__ == '__main__': + executor.start_polling(dp)