Убран говнокод
This commit is contained in:
parent
92fbf28c10
commit
3d574ae888
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,4 +11,5 @@ venv/
|
|||||||
!requirements.txt
|
!requirements.txt
|
||||||
*.ini
|
*.ini
|
||||||
!example_config.ini
|
!example_config.ini
|
||||||
test.py
|
test.py
|
||||||
|
*.sqlite3
|
BIN
database.sqlite3
BIN
database.sqlite3
Binary file not shown.
@ -51,13 +51,9 @@ async def token_set(message: types.Message, state: FSMContext):
|
|||||||
data = coc_api.verify_token(**info)
|
data = coc_api.verify_token(**info)
|
||||||
#{'tag': '#TAG', 'token': 'TOKEN', 'status': 'ok'}
|
#{'tag': '#TAG', 'token': 'TOKEN', 'status': 'ok'}
|
||||||
|
|
||||||
members = coc_api.clan_members()
|
member = coc_api.get_player(data['tag'])
|
||||||
|
clan_member = member['clan']['tag'] == config['API']['clan_tag']
|
||||||
clan_member = False
|
|
||||||
for i in members['items']:
|
|
||||||
if data['tag'] in i['tag']:
|
|
||||||
clan_member = True
|
|
||||||
break
|
|
||||||
|
|
||||||
if clan_member == False:
|
if clan_member == False:
|
||||||
await bot.send_message(
|
await bot.send_message(
|
||||||
|
@ -23,6 +23,7 @@ class KickTimer:
|
|||||||
self._task = asyncio.ensure_future(self._job())
|
self._task = asyncio.ensure_future(self._job())
|
||||||
|
|
||||||
def execute_now(self):
|
def execute_now(self):
|
||||||
|
self._task.cancel()
|
||||||
self._task = asyncio.ensure_future(self._run_now())
|
self._task = asyncio.ensure_future(self._run_now())
|
||||||
|
|
||||||
def cancel(self):
|
def cancel(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user