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
2020-09-16 02:37:31 +02:00

10 lines
362 B
Python

import royalnet.commands as rc
def get_interface_data(data: rc.CommandData):
if data.command.serf.__class__.__name__ == "TelegramSerf":
return data.message.chat.id
if data.command.serf.__class__.__name__ == "DiscordSerf":
return data.message.channel.id
else:
raise rc.UnsupportedError("This interface isn't supported yet.")