Убран говнокод

This commit is contained in:
tema 2022-03-19 00:21:10 +02:00
parent 92fbf28c10
commit 3d574ae888
Signed by: tema
GPG Key ID: 21FDB6D162488F6F
4 changed files with 6 additions and 8 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ venv/
*.ini *.ini
!example_config.ini !example_config.ini
test.py test.py
*.sqlite3

Binary file not shown.

View File

@ -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(

View File

@ -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):