Убран говнокод
This commit is contained in:
parent
92fbf28c10
commit
3d574ae888
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ venv/
|
||||
*.ini
|
||||
!example_config.ini
|
||||
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)
|
||||
#{'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:
|
||||
await bot.send_message(
|
||||
|
@ -23,6 +23,7 @@ class KickTimer:
|
||||
self._task = asyncio.ensure_future(self._job())
|
||||
|
||||
def execute_now(self):
|
||||
self._task.cancel()
|
||||
self._task = asyncio.ensure_future(self._run_now())
|
||||
|
||||
def cancel(self):
|
||||
|
Loading…
Reference in New Issue
Block a user