mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-10 17:53:17 +00:00
Minor typos fixes in examples
This commit is contained in:
parent
e1f61fd4ae
commit
f9c44bb2d7
7 changed files with 52 additions and 51 deletions
|
|
@ -12,9 +12,9 @@ from aiogram.utils.markdown import bold, code, italic, text
|
|||
API_TOKEN = 'BOT TOKEN HERE'
|
||||
PROXY_URL = 'http://PROXY_URL'
|
||||
|
||||
# If authentication is required in your proxy then uncomment next line and change login/password for that
|
||||
# If authentication is required in your proxy then uncomment next line and change login/password for it
|
||||
# PROXY_AUTH = aiohttp.BasicAuth(login='login', password='password')
|
||||
# And add `proxy_auth=PROXY_AUTH` argument in line 25, like that:
|
||||
# And add `proxy_auth=PROXY_AUTH` argument in line 25, like this:
|
||||
# >>> bot = Bot(token=API_TOKEN, loop=loop, proxy=PROXY_URL, proxy_auth=PROXY_AUTH)
|
||||
|
||||
# Get my ip URL
|
||||
|
|
@ -29,7 +29,7 @@ dp = Dispatcher(bot)
|
|||
|
||||
@dp.message_handler(commands=['start'])
|
||||
async def cmd_start(message: types.Message):
|
||||
# Create temporary session
|
||||
# Create a temporary session
|
||||
session = bot.create_temp_session()
|
||||
|
||||
content = []
|
||||
|
|
@ -39,7 +39,7 @@ async def cmd_start(message: types.Message):
|
|||
content.append(text(':globe_showing_Americas:', bold('IP:'), code(await response.text())))
|
||||
# This line is formatted to '🌎 *IP:* `YOUR IP`'
|
||||
|
||||
# Make request with proxy
|
||||
# Make request through proxy
|
||||
async with session.get(GET_IP_URL, proxy=bot.proxy, proxy_auth=bot.proxy_auth) as response:
|
||||
content.append(text(':locked_with_key:', bold('IP:'), code(await response.text()), italic('via proxy')))
|
||||
# This line is formatted to '🔐 *IP:* `YOUR IP` _via proxy_'
|
||||
|
|
@ -51,11 +51,11 @@ async def cmd_start(message: types.Message):
|
|||
bot.destroy_temp_session(session)
|
||||
|
||||
# In this example you can see emoji codes: ":globe_showing_Americas:" and ":locked_with_key:"
|
||||
# Full emoji cheat sheet you can found at https://www.webpagefx.com/tools/emoji-cheat-sheet/
|
||||
# For representing emoji codes to real emoji use emoji util (aiogram.utils.emoji)
|
||||
# and you need to be installed emoji module
|
||||
# You can find full emoji cheat sheet at https://www.webpagefx.com/tools/emoji-cheat-sheet/
|
||||
# For representing emoji codes into real emoji use emoji util (aiogram.utils.emoji)
|
||||
# (you have to install emoji module)
|
||||
|
||||
# For example emojize('Moon face :new_moon_face:') is represents to 'Moon face 🌚'
|
||||
# For example emojize('Moon face :new_moon_face:') is transformed to 'Moon face 🌚'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue