1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
royalnet/rpgpack/utils/getinterfacedata.py

11 lines
362 B
Python
Raw Normal View History

2020-02-22 01:16:54 +00:00
import royalnet.commands as rc
def get_interface_data(data: rc.CommandData):
2020-09-16 00:37:31 +00:00
if data.command.serf.__class__.__name__ == "TelegramSerf":
2020-02-22 01:16:54 +00:00
return data.message.chat.id
2020-09-16 00:37:31 +00:00
if data.command.serf.__class__.__name__ == "DiscordSerf":
2020-02-22 01:16:54 +00:00
return data.message.channel.id
else:
raise rc.UnsupportedError("This interface isn't supported yet.")