mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-13 04:56:35 +03:00
Add get_input_media calls on the generated code
This commit is contained in:
parent
1d50bba8bc
commit
dc73744fc4
|
@ -168,6 +168,8 @@ class TLGenerator:
|
||||||
util_imports.add('get_input_channel')
|
util_imports.add('get_input_channel')
|
||||||
elif a.type == 'InputUser':
|
elif a.type == 'InputUser':
|
||||||
util_imports.add('get_input_user')
|
util_imports.add('get_input_user')
|
||||||
|
elif a.type == 'InputMedia':
|
||||||
|
util_imports.add('get_input_media')
|
||||||
|
|
||||||
if util_imports:
|
if util_imports:
|
||||||
builder.writeln('from {}.utils import {}'.format(
|
builder.writeln('from {}.utils import {}'.format(
|
||||||
|
@ -381,6 +383,8 @@ class TLGenerator:
|
||||||
TLGenerator.write_get_input(builder, arg, 'get_input_channel')
|
TLGenerator.write_get_input(builder, arg, 'get_input_channel')
|
||||||
elif arg.type == 'InputUser' and tlobject.is_function:
|
elif arg.type == 'InputUser' and tlobject.is_function:
|
||||||
TLGenerator.write_get_input(builder, arg, 'get_input_user')
|
TLGenerator.write_get_input(builder, arg, 'get_input_user')
|
||||||
|
elif arg.type == 'InputMedia' and tlobject.is_function:
|
||||||
|
TLGenerator.write_get_input(builder, arg, 'get_input_media')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
builder.writeln('self.{0} = {0}'.format(arg.name))
|
builder.writeln('self.{0} = {0}'.format(arg.name))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user