-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from GLEF1X/dev-1.0beta
New version 1.0.0
- Loading branch information
Showing
79 changed files
with
3,087 additions
and
2,565 deletions.
There are no files selected for viewing
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pytz==2021.1 | ||
aiofiles==0.6.0 | ||
aiohttp==3.7.4post0 | ||
pydantic==1.8.2 | ||
wheel==0.36.2 | ||
loguru==0.5.3 | ||
|
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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from aiogram import Bot, Dispatcher | ||
from aiogram import types | ||
|
||
from glQiwiApi import QiwiWrapper | ||
from glQiwiApi.core.builtin import TelegramPollingProxy | ||
from glQiwiApi.types import Transaction | ||
from glQiwiApi.utils import executor | ||
|
||
api_access_token = "your token" | ||
phone_number = "your number" | ||
|
||
bot = Bot("token from BotFather") | ||
dp = Dispatcher(bot) | ||
|
||
wallet = QiwiWrapper( | ||
api_access_token=api_access_token, | ||
phone_number=phone_number | ||
) | ||
|
||
|
||
@dp.message_handler() | ||
async def message_handler(msg: types.Message): | ||
await msg.answer(text="Привет😇") | ||
|
||
|
||
@wallet.transaction_handler() | ||
async def my_first_handler(update: Transaction): | ||
assert isinstance(update, Transaction) | ||
|
||
|
||
def on_startup(wrapper: QiwiWrapper): | ||
wrapper.dispatcher.logger.info("This message logged on startup") | ||
|
||
|
||
executor.start_polling( | ||
wallet, | ||
on_startup=on_startup, | ||
tg_app=TelegramPollingProxy(dp) | ||
) |
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 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 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
Oops, something went wrong.