def echoserver(self, ctx, serverName:str, channelName:str, *, content:str):
'''
Echos some content back into another server
'''
# It'll only be the owner sending this so there doesn't need to be any error handling.
server = [i for i in self.sparcli.servers if i.name.lower() == serverName.lower()][0]
if channelName.isdigit():
channel = Object(channelName)
elif channelName.startswith('<#') and channelName.endswith('>'):
channel = Object(channelName[2:-1])
else:
channel = [i for i in server.channels if i.name.lower() == channelName.lower()][0]
await self.sparcli.send_message(channel, content)
评论列表
文章目录