mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 00:54:28 +05:00
12 lines
278 B
Python
12 lines
278 B
Python
_params = ['m', 'click', 'cnt', 'pt']
|
|
|
|
def make_ints(d: dict):
|
|
for x in _params:
|
|
try:
|
|
d[x] = int(d.get(x, 0))
|
|
except (ValueError, TypeError):
|
|
pass
|
|
if 'm' not in d:
|
|
d['m'] = 0
|
|
if 'click' not in d:
|
|
d['click'] = 0 |