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

11 lines
324 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):
if data._interface.name == "telegram":
return data.message.chat.id
elif data._interface.name == "discord":
return data.message.channel.id
else:
raise rc.UnsupportedError("This interface isn't supported yet.")