How to use send method in Puppeteer

Best JavaScript code snippet using puppeteer

Run Puppeteer automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

execution.py

Source: execution.py Github

copy
1import os
2import random
3import re
4
5import itchat
6
7import config
8import screenshoot
9from autoreply import MsgAutoReply
10from keywordlistener import KeywordListener as Keyword
11from signin import SignInMPS
12# from takephoto import TakeGIF
13
14
15class Execution:
16    REVOCATIONPATH = "./Revocation/"
17
18    def __init__(self):
19        self.keyword = Keyword()
20        self.snin = SignInMPS()
21        self.reply = MsgAutoReply()
22
23    def Execution(self, message):
24        """
25        执行命令
26        :param message: 微信消息中提取的命令
27        :return: 无
28        """
29        # "%s%s%s%s%s关键词" % ("="*4, "Command Message", "="*4, "\n\n", action)
30
31        command = message['Text']
32        msg_send = "{0}{1}{0}{2}".format("=" * 8, "助手消息", "\n\n")
33        if re.match(r"^查看文件\[.*\]", command):
34            filename = re.search(r"^查看文件\[(.*?)\]$", command).group(1)
35            result = self.ShowFile(filename)
36            if result == True:
37                pass
38            else:
39                msg_send += result
40                itchat.send(msg_send, toUserName='filehelper')
41
42        elif re.match(r"^删除文件\[.*\]", command):
43            filename = re.search(r"^删除文件\[(.*?)\]$", command).group(1)
44            msg_send += self.DeleteFile(filename)
45            itchat.send(msg_send, toUserName='filehelper')
46
47        elif re.match(r"^添加关键词\[.*\]", command):
48            keyword = re.search(r"^添加关键词\[(.*?)\]", command).group(1)
49            msg_send += self.keyword.AddKeyword(keyword)
50            itchat.send(msg_send, toUserName='filehelper')
51
52        elif re.match(r"^删除关键词\[.*\]", command):
53            keyword = re.search(r"^删除关键词\[(.*?)\]", command).group(1)
54            msg_send += self.keyword.DeleteKeyword(keyword)
55            itchat.send(msg_send, toUserName='filehelper')
56
57        elif re.match(r"^撤回附件列表$", command):
58            self.ReturnAttachmentList()
59
60        elif re.match(r"^清空附件列表$", command):
61            self.ClearAttachmentList()
62
63        elif re.match("^查看关键词$", command):
64            msg_send += self.keyword.ShowKeyword()
65            itchat.send(msg_send, toUserName='filehelper')
66
67        elif re.match("^清空关键词$", command):
68            msg_send += self.keyword.ClearKeyword()
69            itchat.send(msg_send, toUserName='filehelper')
70
71        elif re.match("^查看签到口令$", command):
72            msg_send += self.snin.ShowComd()
73            itchat.send(msg_send, toUserName='filehelper')
74
75        elif re.match("^清空签到口令$", command):
76            msg_send += self.snin.ClearComd()
77            itchat.send(msg_send, toUserName='filehelper')
78
79        elif re.match("^添加签到口令\[.*?\]$", command):
80            mps, cmd = re.search("^添加签到口令\[(.*?):(.*?)\]$", command).group(1, 2)
81            self.snin.AddComd(mps, cmd)
82            msg_send += "添加签到口令[{}:{}]成功".format(mps, cmd)
83            itchat.send(msg_send, toUserName='filehelper')
84
85        elif re.match("^删除签到口令\[.*?\]$", command):
86            mps = re.search("^删除签到口令\[(.*?)\]$", command).group(1)
87            msg_send += self.snin.DeleteComd(mps)
88            itchat.send(msg_send, toUserName='filehelper')
89
90        elif re.match("^截图$", command):
91            screenshoot.SC()
92        elif re.match("^添加自动回复\[.*?\]$", command):
93            keyword, content = re.search("^添加自动回复\[(.*?):(.*?)\]$", command).group(1, 2)
94            msg_send += self.reply.AddRule(keyword, content)
95            itchat.send(msg_send, toUserName="filehelper")
96        elif re.match("^删除自动回复\[.*\]$", command):
97            keyword = re.search("^删除自动回复\[(.*?)\]$", command).group(1)
98            msg_send += self.reply.DeleteRule(keyword)
99            itchat.send(msg_send, toUserName='filehelper')
100        elif re.match("^清空自动回复$", command):
101            msg_send += self.reply.ClearRule()
102            itchat.send(msg_send, toUserName='filehelper')
103        elif re.match("^查看自动回复$", command):
104            msg_send += self.reply.ShowRule()
105            itchat.send(msg_send, toUserName='filehelper')
106        elif re.match("^关闭自动回复$", command):
107            msg_send += self.reply.CloseAutoReply()
108            itchat.send(msg_send, toUserName='filehelper')
109        elif re.match("^打开自动回复$", command):
110            msg_send += self.reply.OpenAutoReply()
111            itchat.send(msg_send, toUserName='filehelper')
112        elif re.match("^拍照$", command):
113            msg_send+="功能未开发,敬请期待"
114            itchat.send(msg_send, toUserName='filehelper')
115            """
116           img_name = TakePhoto()
117            if img_name:
118                itchat.send("@[email protected]{}".format(img_name), toUserName='filehelper')
119            else:
120                msg_send += "拍照失败,请重试"
121                itchat.send(msg_send, toUserName='filehelper')
122            """
123
124        elif re.match("^拍动图\d{0,2}$", command):
125            msg_send+="功能未开发,敬请期待"
126            itchat.send(msg_send, toUserName='filehelper')
127            """
128            seconds = re.findall("^拍动图(\d+)", command)
129            if seconds:
130                seconds = int(seconds[0])
131                if seconds not in range(1, 61):
132                    msg_send += "时间输入错误,请重试"
133                    itchat.send(msg_send, toUserName='filehelper')
134                    return
135            else:
136                seconds = 5
137            img_name = TakeGIF(seconds)
138            if img_name:
139                itchat.send("@[email protected]{}".format(img_name), toUserName='filehelper')
140            else:
141                msg_send += "拍照失败,请重试"
142                itchat.send(msg_send, toUserName='filehelper')
143            """
144        elif re.match("^今天吃什么$", command):
145            today_choice = random.choice(config.today_menu)
146            emotion = random.choice(config.emoticons)
147            msg_send += "今天就吃 {} 吧{}{}".format(today_choice, '\n', emotion)
148            itchat.send(msg_send, toUserName='filehelper')
149        elif re.match("^退出程序$", command):
150            itchat.send("退出程序成功", toUserName='filehelper')
151            itchat.logout()
152            os._exit(0)
153        else:
154            itchat.send(r"暂时支持以下指令:{1}"
155                        r"查看/删除文件[文件名]{0}e.g.查看[123345234.mp3]{1}"
156                        r"撤回附件列表(查看都有哪些保存在电脑中的已撤回附件){1}"
157                        r"清空附件列表(清空已经保存在电脑中的附件){1}"
158                        r"添加关键词[关键词]{0}e.g.设置关键词[在不在]{1}"
159                        r"删除关键词[关键词]{0}e.g.删除关键词[在不在]{1}"
160                        r"清空关键词  清空已经设置的所有关键词{1}"
161                        r"查看关键词  查看目前设置的关键词{1}"
162                        r"添加签到口令[公众号:签到口令]{0}e.g.添加签到口令[招商银行信用卡:签到]{1}"
163                        r"删除签到口令[公众号]{0}e.g.删除签到口令[招商银行信用卡]{1}"
164                        r"查看签到口令  查看已经存在的公众和和对应的签到口令{1}"
165                        r"清空签到口令  清空所有签到口令{1}"
166                        r"截图 截取运行本程序的机器当前界面{1}"
167                        r"添加自动回复[针对的关键词:回复内容]{0}e.g.添加自动回复[在不在:我现在有事情,待会儿回复你]{1}"
168                        r"删除自动回复[针对的关键词]{0}e.g.删除自动回复[在不在]{1}"
169                        r"清空自动回复{1}"
170                        r"关闭自动回复{1}"
171                        r"打开自动回复{1}"
172                        r"今天吃什么{1}"
173                        r"退出程序{1}"
174                        r"其他指令暂不支持,请期待最新版本。".format("\n", "\n\n"),
175                        toUserName="filehelper")
176
177    def ShowFile(self, filename):
178        if not os.path.exists(r"./Revocation/" + filename):
179            return "文件:{} 不存在".format(filename)
180
181        if re.search(r"png|jpg|bmp|jpeg|gif|webp", filename):
182            msg_type = "img"
183        elif re.search(r"avi|rm|mp4|wmv", filename):
184            msg_type = "vid"
185        else:
186            msg_type = "fil"
187
188        itchat.send("@{}@{}".format(msg_type, r"./Revocation/" + filename),
189                    toUserName="filehelper")
190
191        return True
192
193    def DeleteFile(self, filename):
194        if not os.path.exists(r"./Revocation/" + filename):
195            return "文件:{} 不存在".format(filename)
196        else:
197            os.remove(r"./Revocation/" + filename)
198            return "文件:{} 删除成功".format(filename)
199
200    def ClearAttachmentList(self):
201        if self.REVOCATIONPATH:
202            try:
203                for item in os.listdir(self.REVOCATIONPATH):
204                    os.remove(self.REVOCATIONPATH + item)
205
206                msg = "{0}{1}{0}{2}撤回助手:清空附件成功".format(
207                    "=" * 6, "助手消息", "\n\n")
208                itchat.send(msg, toUserName='filehelper')
209            except:
210                msg = "{0}{1}{0}{2}撤回助手:清空附件失败,请重试".format(
211                    "=" * 6, "助手消息", "\n\n")
212                itchat.send(msg, toUserName='filehelper')
213        else:
214            msg = "{0}{1}{0}{2}撤回助手:暂时没有附件".format(
215                "=" * 6, "助手消息", "\n\n")
216            itchat.send(msg, toUserName='filehelper')
217
218    # 返回撤回附件所有文件名
219    def ReturnAttachmentList(self):
220        if os.listdir(self.REVOCATIONPATH):
221            msg_send = r"{0}{1}{0}{2}助手消息:所有储存的附件如下:{3}".format("=" * 6, "助手消息", "\n\n", "\n")
222            for item in os.listdir(self.REVOCATIONPATH):
223                msg_send += "{} {}".format(item, "\n")
224            itchat.send(msg_send, toUserName="filehelper")
225        else:
226            msg = r"{0}{1}{0}{2}助手消息:暂时没有撤回的附件".format("=" * 6, "助手消息", "\n\n")
227            itchat.send(msg, toUserName="filehelper")
228
Full Screen

__init__.py

Source: __init__.py Github

copy
1# Regen & Mod by @shamilhabeebnelli
2# Pyrogram - Telegram MTProto API Client Library for Python
3# Copyright (C) 2017-2020 Dan <https://github.com/delivrance>
4#
5# This file is part of Pyrogram.
6#
7# Pyrogram is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Lesser General Public License as published
9# by the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# Pyrogram is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU Lesser General Public License for more details.
16#
17# You should have received a copy of the GNU Lesser General Public License
18# along with Pyrogram.  If not, see <http://www.gnu.org/licenses/>.
19
20from .delete_messages import DeleteMessages
21from .download_media import DownloadMedia
22from .edit_inline_caption import EditInlineCaption
23from .edit_inline_media import EditInlineMedia
24from .edit_inline_reply_markup import EditInlineReplyMarkup
25from .edit_inline_text import EditInlineText
26from .edit_message_caption import EditMessageCaption
27from .edit_message_media import EditMessageMedia
28from .edit_message_reply_markup import EditMessageReplyMarkup
29from .edit_message_text import EditMessageText
30from .forward_messages import ForwardMessages
31from .get_history import GetHistory
32from .get_history_count import GetHistoryCount
33from .get_messages import GetMessages
34from .iter_history import IterHistory
35from .read_history import ReadHistory
36from .retract_vote import RetractVote
37from .search_global import SearchGlobal
38from .search_messages import SearchMessages
39from .send_animation import SendAnimation
40from .send_audio import SendAudio
41from .send_cached_media import SendCachedMedia
42from .send_chat_action import SendChatAction
43from .send_contact import SendContact
44from .send_dice import SendDice
45from .send_document import SendDocument
46from .send_location import SendLocation
47from .send_media_group import SendMediaGroup
48from .send_message import SendMessage
49from .send_photo import SendPhoto
50from .send_poll import SendPoll
51from .send_sticker import SendSticker
52from .send_venue import SendVenue
53from .send_video import SendVideo
54from .send_video_note import SendVideoNote
55from .send_voice import SendVoice
56from .stop_poll import StopPoll
57from .vote_poll import VotePoll
58
59
60class Messages(
61    DeleteMessages,
62    EditMessageCaption,
63    EditMessageReplyMarkup,
64    EditMessageMedia,
65    EditMessageText,
66    ForwardMessages,
67    GetHistory,
68    GetMessages,
69    SendAudio,
70    SendChatAction,
71    SendContact,
72    SendDocument,
73    SendAnimation,
74    SendLocation,
75    SendMediaGroup,
76    SendMessage,
77    SendPhoto,
78    SendSticker,
79    SendVenue,
80    SendVideo,
81    SendVideoNote,
82    SendVoice,
83    SendPoll,
84    VotePoll,
85    StopPoll,
86    RetractVote,
87    DownloadMedia,
88    IterHistory,
89    SendCachedMedia,
90    GetHistoryCount,
91    ReadHistory,
92    EditInlineText,
93    EditInlineCaption,
94    EditInlineMedia,
95    EditInlineReplyMarkup,
96    SendDice,
97    SearchMessages,
98    SearchGlobal
99):
100    pass
101
Full Screen

peer.js

Source: peer.js Github

copy
1"use strict"
2
3function RtcPeer(){
4  //所在房间
5  this.room = "";
6  //接收文件时用于暂存接收文件
7  this.fileData = {};
8  //本地WebSocket连接
9  this.socket = null;
10  //本地socket的id,由后台服务器创建
11  this.socketId = null;
12  //保存所有与本地相连的peer connection, 键为socket id,值为PeerConnection类型
13  this.peerConnections = {};
14  //保存所有与本地连接的cloud peer socket id
15  this.peerList = [];
16  //保存所有与本地连接的mission control peer socket id
17  this.missionControlPeerList = [];
18
19  //初始时需要构建链接的数目
20  this.numStreams = 0;
21  //初始时已经连接的数目
22  this.initializedStreams = 0;
23  //保存所有的data channel,键为socket id,值通过PeerConnection实例的createChannel创建
24  this.dataChannels = {};
25  //保存所有发文件的data channel及其发文件状态
26  this.fileChannels = {};
27  //保存所有接受到的文件
28  this.receiveFiles = {};
29  //define packet Size
30  this.packetSize = 1000;
31
32  //save the config and constrain parameter for the create of peerconnection
33  this.pcConfig = {"iceServers": [{"url": "stun:stun.l.google.com:19302"},
34                                       {"url": "stun:stun1.l.google.com:19302"},
35                                       {"url": "stun:stun.schlund.de"},
36                                       {"url": "stun:stun.rixtelecom.se"}
37                                      ]
38                       };
39  this.pcConstrain = null;
40
41}
42
43RtcPeer.prototype.constructor = RtcPeer;
44
45RtcPeer.prototype.connectToServer = function(){
46  var socket;
47	socket = this.socket = io.connect();
48  var that = this;
49  var REMOTE_DESCRIPTION = 10;
50  var ICE_CANDIDATE = 20;
51  var ConnectionRefused = 30;
52
53  if(this.constructor === RtcMissionPeer){
54    socket.emit("mission control");
55    console.log("init a mission peer !");
56  }else if(this.constructor === RtcPeer){
57    socket.emit("I am a peer");
58    console.log("init a  peer !");
59  }else{
60    console.log("error: can not find any instanc of it !");
61  }
62  
63  socket.on("id", function (socketId){
64    that.socketId = socketId;
65    console.log(that.socketId);
66    document.getElementById('idWell').textContent = 'My ID: '+ that.socketId;
67  });
68  
69  socket.on("peerConToMC", function (peerID){
70    //console.log("MC connect to peer: ",peerID);
71  });
72
73  socket.on("peerListUpdate", function (peerListUpdate){  
74    that.peerList = peerListUpdate;
75    console.log("peerList is updated", that.peerList);
76  });
77
78  socket.on("removePeer", function(socketId){
79    var sendId;
80    that.closePeerConnection(that.peerConnections[socketId]);
81    delete that.peerConnections[socketId];
82    delete that.dataChannels[socketId];
83    for (sendId in that.fileChannels[socketId]) {
84      that.cleanSendFile(sendId, socketId);
85      //that.emit("send_file_error", new Error("Connection has been closed"), data.socketId, sendId, that.fileChannels[data.socketId][sendId].file);
86    }
87    delete that.fileChannels[socketId];
88    //that.emit("remove_peer", socketId);
89  });
90
91  socket.on("connect_to_mission_control", function (socketId){
92    console.log("Event: connect_to_mission_control : create peer connection for mission control !" , socketId);
93    that.missionControlPeerList.push(socketId);
94    var pc = that.createPeerConnection(socketId);
95    //   i, m;
96    //pc.addStream(that.localMediaStream);
97  });
98
99  socket.on("_ice_candidate", function (data){  
100    console.log(" on event : _ice_candidate ", data.socketId);
101    var candidate = new RTCIceCandidate(data);
102    var pc = that.peerConnections[data.socketId];
103    pc.addIceCandidate(candidate);
104
105    console.log("_ice_candidate: get the candiate from peer and add candidate to the peerConnection ! successful: ",
106      that.peerConnections, that.dataChannels);
107    //that.emit('get_ice_candidate', candidate);
108  });
109
110  socket.on("_offer", function (data){  
111    console.log(" on event : _offer ", data.socketId, that.peerConnections);
112    that.receiveOffer(data.socketId, data.sdp);
113  });
114
115  socket.on("_answer", function (data){  
116    console.log(" on event : _answer ", data.socketId);
117    that.receiveAnswer(data.socketId, data.sdp);
118  });
119
120  
121}
122
123
124
125/***********************信令交换部分*******************************/
126
127
128//向所有PeerConnection发送Offer类型信令
129RtcPeer.prototype.sendOffers = function() {
130  console.log("send offers: ", this.peerConnections);
131  var i, m,
132      pc,
133      that = this,
134      pcCreateOfferCbGen = function(pc, socketId) {
135          return function(session_desc) {
136              pc.setLocalDescription(session_desc);
137              var data = {
138                "sdp": session_desc,
139                "socketId": socketId
140              }
141
142              that.socket.emit("__offer", data);
143          };
144      },
145      pcCreateOfferErrorCb = function(error) {
146          console.log(error);
147      };
148  for (i = 0, m = this.peerList.length; i < m; i++) {
149      pc = this.peerConnections[this.peerList[i]];
150      pc.createOffer(pcCreateOfferCbGen(pc, this.peerList[i]), pcCreateOfferErrorCb);
151  }
152};
153
154//接收到Offer类型信令后作为回应返回answer类型信令
155RtcPeer.prototype.receiveOffer = function(socketId, sdp) {
156    //var pc = this.peerConnections[socketId];
157    this.sendAnswer(socketId, sdp);
158};
159
160//发送answer类型信令
161RtcPeer.prototype.sendAnswer = function(socketId, sdp) {
162    var pc = this.peerConnections[socketId];
163
164    console.log("get the current pc: " , this.peerConnections, pc, socketId);
165    var that = this;
166    pc.setRemoteDescription(new RTCSessionDescription(sdp));
167    pc.createAnswer(function(session_desc) {
168        pc.setLocalDescription(session_desc);
169        var data = {
170          "socketId": socketId,
171          "sdp": session_desc
172        }
173
174        that.socket.emit("__answer", data);
175        // that.socket.send(JSON.stringify({
176        //     "eventName": "__answer",
177        //     "data": {
178        //         "socketId": socketId,
179        //         "sdp": session_desc
180        //     }
181        // }));
182    }, function(error) {
183        console.log(error);
184    });
185};
186
187//接收到answer类型信令后将对方的session描述写入PeerConnection中
188RtcPeer.prototype.receiveAnswer = function(socketId, sdp) {
189    console.log("receive the answer from other peers !");
190    var pc = this.peerConnections[socketId];
191    pc.setRemoteDescription(new RTCSessionDescription(sdp));
192};
193
194
195/***********************点对点连接部分*****************************/
196
197//创建与其他用户连接的PeerConnections
198RtcPeer.prototype.createPeerConnections = function() {
199    var i, m;
200    
201    for (i = 0, m = this.peerList.length; i < m; i++) {
202        console.log("socket id :",this.peerList[i]);
203        this.createPeerConnection(this.peerList[i]);
204    }
205
206    console.log("created length of peerConnections: " , this.peerConnections);
207};
208
209
210//创建单个PeerConnection
211RtcPeer.prototype.createPeerConnection = function(socketId) {
212    console.log("create peer connection successful finish !");
213    var that = this;
214    var pcConfig = this.pcConfig;
215    var pcConstrain = this.pcConstrain;
216    //var pc = new PeerConnection(iceServer);
217    var pc = new RTCPeerConnection(pcConfig,pcConstrain);
218
219    this.peerConnections[socketId] = pc;
220
221    pc.onicecandidate = function(evt) {
222        if (evt.candidate)
223            var data = {
224              "label": evt.candidate.sdpMLineIndex,
225              "candidate": evt.candidate.candidate,
226              "socketId": socketId
227            }
228
229            that.socket.emit("__ice_candidate", data);
230
231            // that.socket.emit("__ice_candidate", JSON.stringify({
232            //     "data": {
233            //         "label": evt.candidate.sdpMLineIndex,
234            //         "candidate": evt.candidate.candidate,
235            //         "socketId": socketId
236            //     }
237            // }));
238            // that.socket.send(JSON.stringify({
239            //     "eventName": "__ice_candidate",
240            //     "data": {
241            //         "label": evt.candidate.sdpMLineIndex,
242            //         "candidate": evt.candidate.candidate,
243            //         "socketId": socketId
244            //     }
245            // }));
246        console.log("onicecandidate: network candidates become available and emit __ice_candidate!", socketId);
247        //that.emit("pc_get_ice_candidate", evt.candidate, socketId, pc);
248    };
249
250    pc.onopen = function() {
251        console.log("pc on open !");
252        //that.emit("pc_opened", socketId, pc);
253    };
254
255    pc.onaddstream = function(evt) {
256        console.log("pc.onaddStream: receive video stream from other peer and create video windows !");
257        //that.emit('pc_add_stream', evt.stream, socketId, pc);
258    };
259
260    pc.ondatachannel = function(evt) {
261        console.log("Event : pc on data channel !");
262        that.addDataChannel(socketId, evt.channel);
263        //that.emit('pc_add_data_channel', evt.channel, socketId, pc);
264    };
265    return pc;
266};
267
268//关闭PeerConnection连接
269RtcPeer.prototype.closePeerConnection = function(pc) {
270    if (!pc) return;
271    pc.close();
272};
273
274
275/***********************数据通道连接部分*****************************/
276
277//消息广播
278RtcPeer.prototype.broadcast = function(message) {
279    var socketId;
280    for (socketId in this.dataChannels) {
281        this.sendMessage(message, socketId);
282    }
283};
284
285//发送消息方法
286RtcPeer.prototype.sendMessage = function(message, socketId) {
287    if (this.dataChannels[socketId].readyState.toLowerCase() === 'open') {
288        console.log("sendMessage: send the message to other peer: " + message);
289        this.dataChannels[socketId].send(JSON.stringify({
290            type: "__msg",
291            data: message
292        }));
293    }
294};
295
296//对所有的PeerConnections创建Data channel
297RtcPeer.prototype.addDataChannels = function() {
298    var connection;
299    var label = "sendDataChannel";
300    var dataChannelParms ={orderd:true, reliable:false};
301
302    for (connection in this.peerConnections) {
303        console.log("peer connection: ", connection);
304        this.createDataChannel(connection, dataChannelParms);
305    }
306
307    console.log("check dataChannels: ", this.dataChannels);
308};
309
310//对某一个PeerConnection创建Data channel
311RtcPeer.prototype.createDataChannel = function(socketId, label, dataChannelParms) {
312    var pc, key, channel;
313    pc = this.peerConnections[socketId];
314
315    if (!socketId) {
316        //this.emit("data_channel_create_error", socketId, new Error("attempt to create data channel without socket id"));
317    }
318
319    if (!(pc instanceof RTCPeerConnection)) {
320        //this.emit("data_channel_create_error", socketId, new Error("attempt to create data channel without peerConnection"));
321    }
322    try {
323        // var dataChannelParms ={orderd:true, reliable:false};
324        channel = pc.createDataChannel(label, dataChannelParms);
325        console.log("data channel label : ", label);
326        //channel = pc.createDataChannel(label);
327    } catch (error) {
328        //this.emit("data_channel_create_error", socketId, error);
329    }
330
331    return this.addDataChannel(socketId, channel);
332};
333
334//为Data channel绑定相应的事件回调函数
335RtcPeer.prototype.addDataChannel = function(socketId, channel) {
336    var that = this;
337    channel.onopen = function() {
338        //that.emit('data_channel_opened', channel, socketId);
339    };
340
341    channel.onclose = function(event) {
342        delete that.dataChannels[socketId];
343        //that.emit('data_channel_closed', channel, socketId);
344    };
345
346    channel.onmessage = function(message) {
347        var json;
348        json = JSON.parse(message.data);
349        if (json.type === '__file') {
350            /*that.receiveFileChunk(json);*/
351            that.parseFilePacket(json, socketId);
352        } else if (json.type ==='__download_file') {
353            that.parseDownloadFilePacket(json, socketId);
354        } else {
355            console.log("channel.onmessage: get the message from other peer mit channel: " + json.data);
356            //that.emit('data_channel_message', channel, socketId, json.data);
357        }
358    };
359
360    channel.onerror = function(err) {
361        //that.emit('data_channel_error', channel, socketId, err);
362    };
363
364    this.dataChannels[socketId] = channel;
365    return channel;
366};
367
368
369
370
371/**********************************************************/
372/*                                                        */
373/*                       文件传输                         */
374/*                                                        */
375/**********************************************************/
376
377/************************公有部分************************/
378
379//解析Data channel上的文件类型包,来确定信令类型
380RtcPeer.prototype.parseFilePacket = function(json, socketId) {
381    var signal = json.signal,
382        that = this;
383    if (signal === 'ask') {
384        that.receiveFileAsk(json.sendId, json.name, json.size, socketId);
385    } else if (signal === 'accept') {
386        that.receiveFileAccept(json.sendId, socketId);
387    } else if (signal === 'refuse') {
388        that.receiveFileRefuse(json.sendId, socketId);
389    } else if (signal === 'chunk') {
390        that.receiveFileChunk(json.data, json.sendId, socketId, json.last, json.percent);
391    } else if (signal === 'close') {
392        //TODO
393    }
394};
395
396//解析Data channel上的文件类型包,来确定信令类型, 专用于对文件下载的请求
397RtcPeer.prototype.parseDownloadFilePacket = function(json, socketId) {
398    var signal = json.signal,
399        that = this;
400        if (signal === 'ask_download') {
401            //this mehtode is in peer.js
402            that.sendDownloadList(socketId); 
403            //that.receiveFileAsk(json.sendId, json.name, json.size, socketId);
404        } else if (signal === 'download_list') {
405            //this mehtode is in peer.js
406            that.showDownloadList(json.data, socketId);
407            //that.receiveFileAccept(json.sendId, socketId);
408        } else if (signal === 'selected_sendId') {
409            that.initSelectedFileToSend(json.sendId, socketId);
410            //that.receiveFileRefuse(json.sendId, socketId);
411        } else if (signal === 'chunk') {
412            that.receiveSelectedFileChunk(json.data, json.sendId, socketId, json.last, json.percent);
413        } else if (signal === 'close') {
414            //TODO
415        }
416};
417
418
419/***********************发送者部分***********************/
420
421
422//通过Dtata channel向房间内所有其他用户广播文件
423RtcPeer.prototype.shareFile = function(dom) {
424    var socketId,
425        that = this;
426    for (socketId in that.dataChannels) {
427        that.sendFile(dom, socketId);
428    }
429};
430
431//向某一单个用户发送文件
432RtcPeer.prototype.sendFile = function(dom, socketId) {
433    var that = this,
434        file,
435        reader,
436        fileToSend,
437        sendId;
438    if (typeof dom === 'string') {
439        dom = document.getElementById(dom);
440    }
441    if (!dom) {
442        that.cleanSendFile(sendId, socketId);
443        //that.emit("send_file_error", new Error("Can not find dom while sending file"), socketId);
444        return;
445    }
446    if (!dom.files || !dom.files[0]) {
447        that.cleanSendFile(sendId, socketId);
448        //that.emit("send_file_error", new Error("No file need to be sended"), socketId);
449        return;
450    }
451    file = dom.files[0];
452    that.fileChannels[socketId] = that.fileChannels[socketId] || {};
453    sendId = that.getRandomString();
454    fileToSend = {
455        file: file,
456        state: "ask"
457    };
458    that.fileChannels[socketId][sendId] = fileToSend;
459    that.sendAsk(socketId, sendId, fileToSend);
460    //that.emit("send_file", sendId, socketId, file);
461};
462
463//发送多个文件的碎片
464RtcPeer.prototype.sendFileChunks = function() {
465    var socketId,
466        sendId,
467        that = this,
468        nextTick = false;
469    for (socketId in that.fileChannels) {
470        for (sendId in that.fileChannels[socketId]) {
471            if (that.fileChannels[socketId][sendId].state === "send") {
472                nextTick = true;
473                that.sendFileChunk(socketId, sendId);
474            }
475        }
476    }
477    if (nextTick) {
478        setTimeout(function() {
479            that.sendFileChunks();
480        }, 10);
481    }
482};
483
484
485// test use the slice file example by google
486RtcPeer.prototype.sendFileChunksSlice = function() {
487    var socketId,
488        sendId,
489        that = this;
490
491    var sliceFile = function(offset, sendId, socketId) {
492      var reader = new window.FileReader();
493      reader.onload = (function() {
494        return function(e) {
495          
496          var packet = {
497              type: "__file",
498              signal: "chunk",
499              sendId: sendId
500          };
501          var channel = that.dataChannels[socketId];
502
503          if (!channel) {
504              //that.cleanSendFile(sendId, socketId);
505              //that.emit("send_file_error", new Error("Channel has been destoried"), socketId, sendId, fileToSend.file);
506              return;
507          }
508
509          fileToSend.sendedPackets++;
510          fileToSend.packetsToSend--;
511
512          if (fileToSend.fileData.size > offset + e.target.result.byteLength) {
513            packet.last = false;
514            packet.percent = fileToSend.sendedPackets / fileToSend.allPackets * 100;
515            window.setTimeout(sliceFile, 0, sendId, socketId, offset + that.packetSize);
516          } else {
517            packet.last = true;
518            fileToSend.state = "end";
519            //that.emit("sended_file", sendId, socketId, fileToSend.file);
520            //that.cleanSendFile(sendId, socketId);
521          }
522          packet.data = e.target.result;
523
524          channel.send(JSON.stringify(packet));
525        };
526      })(fileToSend.fileData);
527      var slice = fileToSend.fileData.slice(offset, offset + that.packetSize);
528      reader.readAsArrayBuffer(slice);
529    };
530
531    for (socketId in that.fileChannels) {
532        for (sendId in that.fileChannels[socketId]) {
533            if (that.fileChannels[socketId][sendId].state === "send") {
534                var fileToSend = that.fileChannels[socketId][sendId];
535                sliceFile(0, sendId, socketId);
536            }
537        }
538    }
539};
540
541//发送某个文件的碎片
542RtcPeer.prototype.sendFileChunk = function(socketId, sendId) {
543    var that = this,
544        packetSize = this.packetSize,
545        fileToSend = that.fileChannels[socketId][sendId],
546        packet = {
547            type: "__file",
548            signal: "chunk",
549            sendId: sendId
550        },
551        channel;
552
553    fileToSend.sendedPackets++;
554    fileToSend.packetsToSend--;
555
556
557    if (fileToSend.fileData.length > packetSize) {
558        packet.last = false;
559        packet.data = fileToSend.fileData.slice(0, packetSize);
560        packet.percent = fileToSend.sendedPackets / fileToSend.allPackets * 100;
561
562        updateUploadFileProcess(packet.percent);
563        //that.emit("send_file_chunk", sendId, socketId, fileToSend.sendedPackets / fileToSend.allPackets * 100, fileToSend.file);
564    } else {
565        packet.data = fileToSend.fileData;
566        packet.last = true;
567        fileToSend.state = "end";
568        //that.emit("sended_file", sendId, socketId, fileToSend.file);
569        that.cleanSendFile(sendId, socketId);
570    }
571
572
573
574    // if (fileToSend.fileData.length > packetSize) {
575    //     packet.last = false;
576    //     packet.data = fileToSend.fileData.slice(0, packetSize);
577    //     packet.percent = fileToSend.sendedPackets / fileToSend.allPackets * 100;
578
579    //     updateUploadFileProcess(packet.percent);
580    //     //that.emit("send_file_chunk", sendId, socketId, fileToSend.sendedPackets / fileToSend.allPackets * 100, fileToSend.file);
581    // } else {
582    //     packet.data = fileToSend.fileData;
583    //     packet.last = true;
584    //     fileToSend.state = "end";
585    //     //that.emit("sended_file", sendId, socketId, fileToSend.file);
586    //     that.cleanSendFile(sendId, socketId);
587    // }
588
589    channel = that.dataChannels[socketId];
590
591    if (!channel) {
592        that.cleanSendFile(sendId, socketId);
593        //that.emit("send_file_error", new Error("Channel has been destoried"), socketId, sendId, fileToSend.file);
594        return;
595    }
596    channel.send(JSON.stringify(packet));
597    fileToSend.fileData = fileToSend.fileData.slice(packet.data.length);
598};
599
600//发送文件请求后若对方同意接受,开始传输
601RtcPeer.prototype.receiveFileAccept = function(sendId, socketId) {
602    var that = this,
603        packetSize = this.packetSize,
604        fileToSend,
605        reader,
606        initSending = function(event, text) {
607            fileToSend.state = "send";
608            fileToSend.fileData = event.target.result;
609            fileToSend.sendedPackets = 0;
610            fileToSend.packetsToSend = fileToSend.allPackets = parseInt(fileToSend.fileData.length / packetSize, 10);
611            that.sendFileChunks();
612        };
613    fileToSend = that.fileChannels[socketId][sendId];
614    reader = new window.FileReader(fileToSend.file);
615    //reader.readAsArrayBuffer(fileToSend.file);
616    reader.readAsDataURL(fileToSend.file);
617    reader.onload = initSending;
618    //that.emit("send_file_accepted", sendId, socketId, that.fileChannels[socketId][sendId].file);
619};
620
621//发送文件请求后若对方拒绝接受,清除掉本地的文件信息
622RtcPeer.prototype.receiveFileRefuse = function(sendId, socketId) {
623    var that = this;
624    that.fileChannels[socketId][sendId].state = "refused";
625    //that.emit("send_file_refused", sendId, socketId, that.fileChannels[socketId][sendId].file);
626    that.cleanSendFile(sendId, socketId);
627};
628
629//清除发送文件缓存
630RtcPeer.prototype.cleanSendFile = function(sendId, socketId) {
631    var that = this;
632    delete that.fileChannels[socketId][sendId];
633};
634
635//发送文件请求
636RtcPeer.prototype.sendAsk = function(socketId, sendId, fileToSend) {
637    var that = this,
638        channel = that.dataChannels[socketId],
639        packet;
640    if (!channel) {
641        that.cleanSendFile(sendId, socketId);
642        //that.emit("send_file_error", new Error("Channel has been closed"), socketId, sendId, fileToSend.file);
643    }
644    packet = {
645        name: fileToSend.file.name,
646        size: fileToSend.file.size,
647        sendId: sendId,
648        type: "__file",
649        signal: "ask"
650    };
651    channel.send(JSON.stringify(packet));
652};
653
654//获得随机字符串来生成文件发送ID
655RtcPeer.prototype.getRandomString = function() {
656    return (Math.random() * new Date().getTime()).toString(36).toUpperCase().replace(/\./g, '-');
657};
658
659/***********************接收者部分***********************/
660
661
662//接收到文件碎片
663RtcPeer.prototype.receiveFileChunk = function(data, sendId, socketId, last, percent) {
664    var that = this,
665        fileInfo = that.receiveFiles[sendId];
666    if (!fileInfo.data) {
667        fileInfo.state = "receive";
668        fileInfo.data = [];
669        //fileInfo.data = "";
670    }
671    fileInfo.data = fileInfo.data || [];
672    fileInfo.data.push(data);
673    //fileInfo.data = fileInfo.data || "";
674    //fileInfo.data += data;
675
676    if (last) {
677        fileInfo.state = "end";
678        that.showTransferedFile(sendId);
679        //that.getTransferedFile(sendId);
680    } else {
681        //receive file : todo: Math.cell(percent)%
682        console.log("update received file als percent: ", percent);
683        updateUploadFileProcess(percent);
684        //that.emit("receive_file_chunk", sendId, socketId, fileInfo.name, percent);
685    }
686};
687
688//接收到所有文件碎片后将其组合成一个完整的文件并显示在云端可供下载
689RtcPeer.prototype.showTransferedFile = function(sendId){
690  var fileInfo = this.receiveFiles[sendId];
691  var fileUrl = 'Click to download \'' + fileInfo.name + '\' (' + fileInfo.size +' bytes)';
692  var listitem = '<li class=\"list-group-item\"><a id=\"'+sendId+'\">'+ fileUrl + '</a></li>';
693
694  fileList.append(listitem);
695
696  //var received = new window.Blob(fileInfo.data);
697  var received = (fileInfo.data).join("");
698
699  var downloadNode = document.getElementById(sendId); //$("#"+sendId);
700  //downloadNode.href = (window.URL || window.webkitURL).createObjectURL(received);
701  downloadNode.href = received;
702  downloadNode.target = '_blank';
703  downloadNode.download = fileInfo.name || dataURL;
704
705  (window.URL || window.webkitURL).revokeObjectURL(downloadNode.href);
706  //console.log("test list node:", downloadNode);
707  //this.cleanReceiveFile(sendId);
708};
709
710//接收到发送文件请求后记录文件信息
711RtcPeer.prototype.receiveFileAsk = function(sendId, fileName, fileSize, socketId) {
712    var that = this;
713    that.receiveFiles[sendId] = {
714        socketId: socketId,
715        state: "ask",
716        name: fileName,
717        size: fileSize
718    };
719    //接受到上传文件的请求,在云端弹出对话框询问
720    var confirmToReceiveFile = function(sendId, socketId, fileName, fileSize) {
721        //var p;
722        if (window.confirm(socketId + "用户想要给你传送" + fileName + "文件,大小" + fileSize + "KB,是否接受?")) {
723          that.sendFileAccept(sendId);
724          // p = document.createElement("p");
725          // p.innerText = "准备接收" + fileName + "文件";
726          // p.id = "rf-" + sendId;
727          // files.appendChild(p);
728        } else {
729          that.sendFileRefuse(sendId);
730        }
731    };
732
733    confirmToReceiveFile(sendId, socketId, fileName, fileSize);
734    //that.emit("receive_file_ask", sendId, socketId, fileName, fileSize);
735};
736
737
738
739//发送同意接收文件信令
740RtcPeer.prototype.sendFileAccept = function(sendId) {
741    var that = this,
742        fileInfo = that.receiveFiles[sendId],
743        channel = that.dataChannels[fileInfo.socketId],
744        packet;
745    if (!channel) {
746        that.cleanSendFile(sendId, socketId);
747        //that.emit("receive_file_error", new Error("Channel has been destoried"), sendId, socketId);
748    }
749    packet = {
750        type: "__file",
751        signal: "accept",
752        sendId: sendId
753    };
754    console.log("Send file Ask successful accepted !");
755    channel.send(JSON.stringify(packet));
756};
757
758//发送拒绝接受文件信令
759RtcPeer.prototype.sendFileRefuse = function(sendId) {
760    var that = this,
761        fileInfo = that.receiveFiles[sendId],
762        channel = that.dataChannels[fileInfo.socketId],
763        packet;
764    if (!channel) {
765        that.cleanSendFile(sendId, socketId);
766        //that.emit("receive_file_error", new Error("Channel has been destoried"), sendId, socketId);
767    }
768    packet = {
769        type: "__file",
770        signal: "refuse",
771        sendId: sendId
772    };
773    channel.send(JSON.stringify(packet));
774    that.cleanReceiveFile(sendId);
775};
776
777//清除接受文件缓存
778RtcPeer.prototype.cleanReceiveFile = function(sendId) {
779    var that = this;
780    delete that.receiveFiles[sendId];
781};
782
783
784
785
786/**********************************************************/
787/*                                                        */
788/*        提供 mision control 文件下载功能                  */
789/*                                                        */
790/**********************************************************/
791
792
793/*********************** cloud peer  ***********************/
794
795//向 mission control 提供可下载文件列表
796RtcPeer.prototype.sendDownloadList = function(socketId) {
797    var that = this,
798        channel = that.dataChannels[socketId],
799        sendId,
800        fileInfo,
801        downloadFiles = [],
802        packet;
803    if (!channel) {
804        // todo : show error
805        //that.cleanSendFile(sendId, socketId);
806        //that.emit("receive_file_error", new Error("Channel has been destoried"), sendId, socketId);
807    }
808
809    //var receiveFiles = that.receiveFiles;
810    for (sendId in that.receiveFiles) {
811        console.log("show the data in the receiveFiles[sendId]: "+ that.receiveFiles[sendId].data);
812        fileInfo = that.receiveFiles[sendId];
813        var downloadFile = {
814          name: fileInfo.name,
815          size: fileInfo.size,
816          sendId: sendId
817        }
818
819        downloadFiles.push(downloadFile);
820    }
821
822    packet = {
823        type: "__download_file",
824        signal: "download_list",
825        data: downloadFiles
826    };
827
828    channel.send(JSON.stringify(packet));
829
830    console.log("Send down load file  list successful !");
831};
832
833
834// 初始化已选的文件以便于发送
835RtcPeer.prototype.initSelectedFileToSend = function(sendId, socketId) {
836    var that = this,
837        dataForDownload,
838        fileToSend,
839        sendId;
840
841    that.fileChannels[socketId] = that.fileChannels[socketId] || {};
842
843    // 复制that.receiveFiles[sendId].data 并生成一个新的数组
844    dataForDownload = that.receiveFiles[sendId].data.slice();
845
846    // dataForDownload 是一个存放了一段段数据段的数组 
847    fileToSend = {
848        state: "send",
849        fileData: dataForDownload 
850    };
851
852    fileToSend.sendedPackets = 0;
853    fileToSend.packetsToSend = fileToSend.allPackets = dataForDownload.length;
854    //that.sendAsk(socketId, sendId, fileToSend);
855    //that.emit("send_file", sendId, socketId, file);
856    that.fileChannels[socketId][sendId] = fileToSend;
857    that.sendSelectedFileChunks(sendId, socketId);
858};
859
860
861//向 mission control 传输文件 , 每次传送一个chunk
862RtcPeer.prototype.sendSelectedFileChunks = function(sendId, socketId) {
863    // var socketId,
864    //     sendId,
865    var that = this,
866        nextTick = false;
867
868    console.log("that.fileChannels[socketId][sendId]: ", that.fileChannels[socketId][sendId]);
869    if (typeof that.fileChannels[socketId][sendId] != 'undefined') {
870        if(that.fileChannels[socketId][sendId].state === "send") {
871            nextTick = true;
872            that.sendSelectedFileChunk(socketId, sendId);
873        }
874    }
875     
876    if (nextTick) {
877        setTimeout(function() {
878            that.sendSelectedFileChunks(sendId, socketId);
879        }, 10);
880    }
881};
882
883//发送某个文件的碎片
884RtcPeer.prototype.sendSelectedFileChunk = function(socketId, sendId) {
885    var that = this,
886        //packetSize = this.packetSize,
887        fileToSend = that.fileChannels[socketId][sendId],
888        packet = {
889            type: "__download_file",
890            signal: "chunk",
891            sendId: sendId
892        },
893        channel;
894
895    fileToSend.sendedPackets++;
896    fileToSend.packetsToSend--;
897
898    packet.data = fileToSend.fileData.shift();
899    packet.percent = fileToSend.sendedPackets / fileToSend.allPackets * 100;
900
901    if(fileToSend.fileData.length > 0){
902        packet.last = false;
903        //packet.data = fileToSend.fileData.shift();
904        
905
906        console.log("send file percent: ", packet.percent);
907        //updateUploadFileProcess(packet.percent);
908    } else {
909        //packet.data = fileToSend.fileData.shift();
910        packet.last = true;
911        fileToSend.state = "end";
912        //that.emit("sended_file", sendId, socketId, fileToSend.file);
913        that.cleanSendFile(sendId, socketId);
914    }
915
916    channel = that.dataChannels[socketId];
917
918    if (!channel) {
919        that.cleanSendFile(sendId, socketId);
920        //that.emit("send_file_error", new Error("Channel has been destoried"), socketId, sendId, fileToSend.file);
921        return;
922    }
923    channel.send(JSON.stringify(packet));
924    //fileToSend.fileData = fileToSend.fileData.slice(packet.data.length);
925};
926
927
928
929
930
931
Full Screen

examples.js

Source: examples.js Github

copy
1const examples = require('express').Router();
2
3examples.get('/', (req, res) => res.send('I am listening!'));
4examples.get('/ice_cream', (req, res) => res.send('Mint ice cream'));
5
6// 2019
7
8examples.get('/you_lazy', (req, res) => res.send('Okay Boomer'));
9examples.get('/cs', (req, res) => res.send('COMPUTER SCIENCE IS AWESOME!'));
10examples.get('/HELLO', (req,res)=> res.send('Welcome!'));
11examples.get('/LightningInABottle', (req,res) => res.send('Blip'));
12examples.get('/help!', (req, res) => res.send('Everything is going to be ok.'));
13examples.get('/why_did_the_chicken_cross_the_road',(req, res) => res.send('Well?'));
14examples.get('/howdy', (req, res) => res.send('Howdy, there partner!!'));
15examples.get('/how_are_you_sugar', (req, res) => res.send('Better now you\'re here!'));
16examples.get('/winter', (req, res) => res.send('S N O W!'));
17examples.get('/bend',(req,res)=> res.send('Beer and Puffys'));
18examples.get('/yeet', (req, res) => res.send('OOF'));
19examples.get('/hi', (req, res) => res.send('hello back'));
20examples.get('/num nums', (req, res) => res.send('food'));
21examples.get('/pizza', (req, res) => res.send('Pepperoni Pizza'));
22examples.get('/uh_oh', (req, res) => res.send('Stinky'));
23examples.get('/tired', (req,res) => res.send ('Ligma'));
24examples.get('/why_frog_sad', (req, res) => res.send('His car got toad :('));
25examples.get('/loss', (req, res) => res.send('|, ||,||, |_'));
26examples.get('/listening', (req, res) => res.send('Nobody is listening!'));
27examples.get('/best_dog', (req, res) => res.send('All doggos are the best!'));
28examples.get('/weather', (req, res) => res.send('Look out the window!'));
29examples.get('/dogs', (req, res) => res.send('Adopt don\'t shop!'));
30examples.get('/money', (req, res) => res.send('Show me the money'));
31examples.get('/minecraft', (req, res) => res.send('*Digs straight down*'));
32examples.get('/query', (req, res) => res.send('idk google it'));
33examples.get('/please_help', (req,res) => res.send('Why do I care?'));
34
35// 2018
36
37examples.get('/RKS', (req, res) => res.send('MintBerryCrunch'));
38examples.get('/HemenwayThanksgiving', (req, res) => res.send('SweetPotato'));
39examples.get('/Cat_nya', (req, res) => res.send('Nyaaaaaaaaaaaaaaa!'));
40examples.get('/stubaruu', (req, res) => res.send('stuff'));
41examples.get('/karp', (req, res) => res.send('Dogs'));
42examples.get('/NOID', (req, res) => res.send('enter the VOID'));
43examples.get('/can_I_get_a_hoo_yaa', (req,res) => res.send('hoo yaa'));
44examples.get('/Hungry', (req, res) => res.send('Eat Food'));
45examples.get('/wright', (req, res) => res.send('Pasta'));
46examples.get('/Stewart', (req, res) => res.send('My dogs'));
47examples.get('/Bertram', (req, res) => res.send('Fire Hue'));
48examples.get('/kolb', (req, res) => res.send('Nice'));
49examples.get('/best_town', (req, res) => res.send('Bend, obviously'));
50examples.get('/football_team', (req, res) => res.send('LA Chargers'));
51examples.get('/cookie_dough', (req, res) => res.send('rocky road'));
52examples.get('/YOTE', (req, res) => res.send('YEEEET'));
53examples.get('/Mock', (req, res) => res.send('Dolla Dolla Bills Y\'all'));
54examples.get('/Orue', (req, res)=>res.send('Comic Books'));
55examples.get('/mashjam', (req, res)=>res.send('White Buffalo'));
56examples.get('/gomez', (req, res) => res.send('I am cool'));
57examples.get('/white', (req, res) => res.send ('Bulldog Puppies'));
58examples.get('/doodlebob', (req, res) => res.send('Hoy minoy miñoy'));
59examples.get('/manbearpig', (req, res) => res.send('Al Gore'));
60examples.get('/totallysecurechanneladminonly', (req, res) => res.send('Look at them.'));
61
62module.exports = examples;
63
64
65
66
67
Full Screen

vim_test.js

Source: vim_test.js Github

copy
1/* ***** BEGIN LICENSE BLOCK *****
2 * Distributed under the BSD license:
3 *
4 * Copyright (c) 2014, Ajax.org B.V.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 *     * Redistributions of source code must retain the above copyright
10 *       notice, this list of conditions and the following disclaimer.
11 *     * Redistributions in binary form must reproduce the above copyright
12 *       notice, this list of conditions and the following disclaimer in the
13 *       documentation and/or other materials provided with the distribution.
14 *     * Neither the name of Ajax.org B.V. nor the
15 *       names of its contributors may be used to endorse or promote products
16 *       derived from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * ***** END LICENSE BLOCK ***** */
30
31if (typeof process !== "undefined") {
32    require("amd-loader");
33}
34
35define(function(require, exports, module) {
36"use strict";
37
38function repeat(str, times) {
39    return new Array(times + 1).join(str);
40}
41
42var EditSession = require("./../edit_session").EditSession,
43    Editor = require("./../editor").Editor,
44    UndoManager = require("./../undomanager").UndoManager,
45    MockRenderer = require("./../test/mockrenderer").MockRenderer,
46    assert = require("./../test/assertions"),
47    keys = require("./../lib/keys"),
48    vim = require("./vim"),
49    editor,
50    keyCodeByFuncKey = {},
51    tests = {};
52
53//Helper functions
54
55function initKeyCodeByFuncKey() {
56    for (var keyCode in keys.FUNCTION_KEYS) {
57        var funcKey = keys.FUNCTION_KEYS[keyCode];
58        keyCodeByFuncKey[funcKey] = keyCode;
59    }
60}
61
62function initEditor(docString) {
63    var session = new EditSession(docString.split("\n"));
64    var undoManager = new UndoManager();
65    session.setUndoManager(undoManager);
66    editor = new Editor(new MockRenderer(), session);
67    editor.setKeyboardHandler(vim.handler);
68}
69
70function sendKeys() {
71    //Vim handler needs to be sent a key at a time for undo to work
72    //Handle any mix of command keys and text input arguments
73    for (var argInt=0; argInt<arguments.length; argInt++) {
74        var arg = arguments[argInt];
75        var keyMods = arg.split(/[\-]/);
76        var trailingKeys = keyMods.pop();
77        var hashId = 0;
78        for (var keyModIndex in keyMods) {
79            var keyMod = keyMods[keyModIndex];
80            var lowerKeyMod = keyMod.toLowerCase();
81            if (keys.KEY_MODS.hasOwnProperty(lowerKeyMod)) {
82                hashId |= keys.KEY_MODS[lowerKeyMod];
83            }
84        }
85        if (hashId === 0) {
86            trailingKeys = arg;
87        }
88        var keyCode;
89        if (keyCodeByFuncKey.hasOwnProperty(trailingKeys)) {
90            keyCode = keyCodeByFuncKey[trailingKeys];
91            editor.onCommandKey({}, hashId, keyCode);
92        } else {
93            if (hashId !== 0) {
94                keyCode = trailingKeys.toUpperCase().charCodeAt(0);
95                editor.onCommandKey({}, hashId, keyCode);
96            } else {
97                for (var i=0; i<trailingKeys.length; i++) {
98                    var key = trailingKeys.charAt(i);
99                    editor.onTextInput(key);
100                    editor.session.$syncInformUndoManager();
101                }
102            }
103        }
104    }
105}
106
107function assertContent(expectedText) {
108    var actualText = editor.session.toString();
109    assert.strictEqual(actualText, expectedText, "Content expected: " + expectedText + ", actual: " + actualText);
110}
111
112function assertPosition(expectedRow, expectedCol) {
113    var actualPosition = editor.getCursorPosition();
114    var actualRow = actualPosition.row;
115    var actualCol = actualPosition.column;
116    assert.strictEqual(actualRow, expectedRow, "Row expected: " + expectedRow + ", actual: " + actualRow);
117    assert.strictEqual(actualCol, expectedCol, "Column expected: " + expectedCol + ", actual: " + actualCol);
118}
119
120function addTest(title, chapter, section, testFunction) {
121    var href = "http://vimdoc.sourceforge.net/htmldoc/usr_" + chapter + ".html#" + chapter + "." + section;
122    var testName;
123    if (location.protocol === "file:") { //running in console mode
124        testName = "test " + title + " (See " + href + ")";
125    } else {
126        testName = "test <a href=\"" + href + "\" target=\"_blank\">" + title + "</a>";
127    }
128    tests[testName] = testFunction;
129}
130
131//Define the tests
132
133initKeyCodeByFuncKey();
134
135addTest("Insert text", "02", "2", function() {
136    var text = "A very intelligent turtle\nFound programming UNIX a hurdle";
137    initEditor("");
138    sendKeys("i", text, "Esc");
139    assertContent(text);
140    sendKeys("Esc", "Esc");
141    assertContent(text);
142});
143
144addTest("Moving around", "02", "3", function() {
145    initEditor(" k \nh l\n j ");
146    sendKeys("hjj");
147    assertPosition(2, 0);
148    sendKeys("jll");
149    assertPosition(2, 2);
150    sendKeys("lkk");
151    assertPosition(0, 2);
152    sendKeys("khh");
153    assertPosition(0, 0);
154});
155
156addTest("Deleting characters", "02", "4", function() {
157    var text = "A very intelligent turtle\nFound programming UNIX a hurdle";
158    initEditor(text);
159    sendKeys("xxxxxxx");
160    assertContent(text.substring(7));
161    sendKeys("iA young ", "Esc");
162    assertContent("A young intelligent turtle\nFound programming UNIX a hurdle");
163    sendKeys("dd");
164    assertContent("Found programming UNIX a hurdle");
165    sendKeys("ddiA young intelligent\nturtle", "Esc", "kJ");
166    assertContent("A young intelligent turtle");
167});
168
169addTest("Undo and Redo [PARTIAL]", "02", "5", function() {
170    var text = "A young intelligent turtle";
171    initEditor(text);
172    sendKeys("ddu");
173    assertContent(text);
174    sendKeys("0xxxxxxx");
175    assertContent(text.substring(7));
176    for (var i=6; i>=0; i--) {
177        sendKeys("u");
178        assertContent(text.substring(i));
179    }
180    sendKeys("ctrl-r", "ctrl-r");
181    assertContent(text.substring(2));
182    text = "A very intelligent turtle";
183    sendKeys("ddi", text, "Esc");
184    sendKeys("0wxxxxxwwxxxxxx");
185    assertContent("A intelligent ");
186/* "U" fails
187    sendKeys("U");
188    assertContent(text);
189    sendKeys("u");
190    assertContent("A intelligent ");
191*/
192});
193
194addTest("Other editing commands [PARTIAL]", "02", "6", function() {
195    var text = "and that's not saying much for the turtle.";
196    initEditor(text);
197    sendKeys("$xa!!!", "Esc");
198    assertContent(text.slice(0, -1) + "!!!");
199    var text1 = "A very intelligent turtle";
200    var text2 = "Found programming UNIX a hurdle";
201    sendKeys("ddi", text1 + "\n" + text2, "Esc");
202    var text3 = "That liked using Vim";
203    sendKeys("ko", text3, "Esc");
204    assertContent([text1, text3, text2].join("\n"));
205    sendKeys("O", "Esc");
206    assertContent([text1, "", text3, text2].join("\n"));
207/* "3a!" fails
208    sendKeys("3a!", "Esc");
209*/
210    sendKeys("a!!!", "Esc");
211    assertContent([text1, "!!!", text3, text2].join("\n"));
212    sendKeys("hhh3x");
213    assertContent([text1, "", text3, text2].join("\n"));
214});
215
216addTest("Getting out [PARTIAL]", "02", "7", function() {
217    initEditor("");
218    sendKeys("ZZ");
219    /*
220    sendKeys("aSome text", "Esc");
221    sendKeys(":q", "Return");
222    sendKeys(":q!", "Return");
223
224    sendKeys(":e!", "Return");
225    */
226});
227
228addTest("Finding help [PARTIAL]", "02", "8", function() {
229    initEditor("");
230    sendKeys(":help", "Return");
231    sendKeys("F1");
232});
233
234addTest("Word movement [PARTIAL]", "03", "1", function() {
235    var text = "This is a line with example text";
236    initEditor(text);
237    sendKeys("www3w");
238    assertPosition(0, 28);
239    sendKeys("b2b");
240    assertPosition(0, 10);
241    sendKeys("3le");
242    assertPosition(0, 18);
243/* "ge" fails
244    sendKeys("2ge");
245    assertPosition(0, 8);
246 TODO: What iskeyword behavior is assumed for Ace?
247 Need to test "b,w,ge,e,gE, B, W, E" behaviors
248    sendKeys("ddaThis is-a line, with special/separated/words (and some more).", "Esc");
249    sendKeys("$4b");
250    assertPosition(0, 21);
251*/
252});
253
254addTest("Moving to the start or end of a line", "03", "2", function() {
255    var text = "     This is a line with example text";
256    var textLength = text.length;
257    initEditor(text);
258    sendKeys("$");
259    assertPosition(0, 36);
260    sendKeys("0");
261    assertPosition(0, 0);
262    sendKeys("End");
263    assertPosition(0, 36);
264    sendKeys("Home");
265    assertPosition(0, 0);
266    sendKeys("^");
267    assertPosition(0, 5);
268    sendKeys("$^");
269    assertPosition(0, 5);
270    sendKeys("ddaA young intelligent turtle\nFound programming UNIX a hurdle", "Esc", "k0");
271    assertPosition(0, 0);
272    sendKeys("2$");
273    assertPosition(1, 30);
274});
275
276addTest("Moving to a character [PARTIAL]", "03", "3", function() {
277    var text = "To err is human.  To really foul up you need a computer.";
278    initEditor(repeat(text, 2));
279    sendKeys("fh");
280    assertPosition(0, 10);
281    sendKeys("3fl");
282    assertPosition(0, 31);
283    sendKeys("Fh");
284    assertPosition(0, 10);
285    sendKeys("Fh");
286    assertPosition(0, 10);
287    sendKeys("2tn");
288    assertPosition(0, 39);
289    sendKeys("Th");
290    assertPosition(0, 11);
291    sendKeys("tn");
292    assertPosition(0, 13);
293    sendKeys(";");
294    assertPosition(0, 39);
295/* Problem with mockrenderer?
296    sendKeys(";");
297    assertPosition(0, 39);
298*/
299    sendKeys(",");
300    assertPosition(0, 15);
301    sendKeys("0f", "Esc", "w");
302    assertPosition(0, 3);
303});
304
305addTest("Matching a parenthesis", "03", "4", function() {
306    var text = "if (a == (b * c) / d)\nif [a == [b * c] / d]\nif {a == {b * c} / d}";
307    initEditor(text);
308    sendKeys("%");
309    assertPosition(0, 20);
310    sendKeys("%");
311    assertPosition(0, 3);
312    sendKeys("0j%");
313    assertPosition(1, 20);
314    sendKeys("%");
315    assertPosition(1, 3);
316    sendKeys("0j%");
317    assertPosition(2, 20);
318    sendKeys("%");
319    assertPosition(2, 3);
320});
321
322addTest("Moving to a specific line [PARTIAL]", "03", "5", function() {
323    var text = "first line of a file\n" + repeat("text text text text\n", 8) + "last line of a file";
324    initEditor(text);
325    sendKeys("7G");
326    assertPosition(6, 0);
327    sendKeys("gg");
328    assertPosition(0, 0);
329    sendKeys("G");
330    assertPosition(9, 0);
331/* <percent>% motion fails
332    sendKeys("50%");
333    assertPosition(4, 0);
334    sendKeys("90%");
335    assertPosition(8, 0);
336"H, M, L" motion supported, but mockrenderer.js has no 'getScrollBottomRow', etc.
337    sendKeys("L");
338    assertPosition(9, 0);
339    sendKeys("M");
340    assertPosition(4, 0);
341    sendKeys("H");
342    assertPosition(0, 0);
343*/
344});
345
346addTest("Telling where you are [PARTIAL]", "03", "6", function() {
347    // Ctrl-G, :set commands not implemented?
348});
349
350addTest("Scrolling around [PARTIAL]", "03", "7", function() {
351    /* Ctrl-D, Ctrl-U, Ctrl-E, Ctrl-Y, zz, zt, zb cannot be tested with mockrenderer
352    var text = repeat("some text\n", 4) + "\n123456\n7890\n" + repeat("\nexample", 4); 
353    initEditor(text);
354    sendKeys("Ctrl-D");
355    */
356});
357
358addTest("Simple searches [PARTIAL]", "03", "8", function() {
359    var text = repeat("To find the word #include\n", 10);
360    initEditor(text);
361/* Search fails, (is a command line really necessary for this to work?
362    sendKeys("/include", "Return");
363    assertPosition(0, 18);
364    sendKeys("/#include", "Return");
365    assertPosition(1, 17);
366    sendKeys("nnn");
367    assertPosition(4, 17);
368    sendKeys("3n");
369    assertPosition(7, 17);
370    sendKeys("?word", "Return");
371    assertPosition(7, 12);
372    sendKeys("N");
373    assertPosition(8, 12);
374    sendKeys("/#include", "Return");
375    assertPosition(8, 17);
376    sendKeys("N");
377    assertPosition(7, 17);
378    //Skipping ':set ignorecase' and ':set noignorecase'
379    //Skipping search history
380    //TODO additional search tests
381*" and "#" searches fail, no getPixelPosition in mockrenderer
382    sendKeys("gg*");
383    assertPosition(1, 5);
384*/
385});
386
387addTest("Simple search patterns [PARTIAL]", "03", "9", function() {
388});
389
390addTest("Using marks [PARTIAL]", "03", "10", function() {
391/* '', ``, Ctrl-O, Ctrl-I fail
392    var text1 = "example text\n" 
393    var text2 = "line 33 text\n"
394    var text3 = "There you are\n"
395    var text = repeat(text1, 32) + text2 + repeat(text1, 2) + text3 + text1;
396    initEditor(text);
397    sendKeys("G");
398    sendKeys("``");
399    assertPosition(0, 0);
400    sendKeys("``");
401    assertPosition(37, 0);
402    sendKeys("10k``");
403    assertPosition(0, 0);
404    sendKeys("33G");
405    assertPosition(33, 0);
406    sendKeys("/^The");
407    assertPosition((36, 0);
408    sendKeys("Ctrl-O");
409    assertPosition(33, 0);
410    sendKeys("Ctrl-O");
411    assertPosition(0, 0);
412    sendKeys("Ctrl-I");
413    assertPosition(33, 0);
414    sendKeys("Ctrl-I");
415    assertPosition(36, 0);
416    sendKeys(":0$msG$me's");
417    assertPosition(0, 0);
418    sendKeys("`s");
419    assertPosition(0, 11);
420    sendKeys("'e");
421    assertPosition(36, 0);
422    sendKeys("`e"):
423    assertPosition(36, 11);
424*/
425});
426
427addTest("Operators and motions [PARTIAL]", "04", "1", function() {
428    initEditor("To err is human. To really foul up you need a computer.");
429    sendKeys("5wd4w");
430    assertContent("To err is human. you need a computer.");
431/* "d<count>e" fails
432    sendKeys("d2e");
433    assertContent("To err is human.  a computer.");
434
435    sendKeys("2hd$");
436    assertContent("To err is human");
437*/
438});
439
440addTest("Changing text [PARTIAL]", "04", "2", function() {
441    initEditor("To err is human");
442/*
443// "c<count>w" fails
444//  sendKeys("wc2wbe", "Esc");
445//  assertContent("To be human");
446    sendKeys("uccabc def", "Esc");
447    assertContent("abc def");
448    sendKeys("0c$123", "Esc");
449    assertContent("123");
450    sendKeys("hx");
451    assertContent("13");
452    sendKeys("X");
453    assertContent("3");
454    sendKeys("a 2 1", "Esc", "0wD");
455    assertContent("3 ");
456    sendKeys("a2 1", "Esc", "0wC4 5", "Esc");
457    assertContent("3 4 5");
458    sendKeys("0ws6", "Esc");
459    assertContent("3 6 5");
460    sendKeys("S1 3 2", "Esc");
461    assertContent("1 3 2");
462    sendKeys("$a4 6 5", "Esc", "03d2w");
463    assertContent("");
464    sendKeys("athere is somerhing grong here", "Esc", "0rTww4lrtwrw");
465    assertContent("There is something wrong here");
466    sendKeys("03w5rx");
467    assertContent("There is something xxxxx here");
468// "r<Return>" fails - also replaces trailing space
469    sendKeys("r", "Return");
470    assertContent("There is something xxxx\n here");
471    //TODO - 4r<Return>
472*/
473});
474
475addTest("Repeating a change [PARTIAL]", "04", "3", function() {
476/*
477    initEditor("To <B>generate</B> a table of <B>contents");
478    sendKeys("f<df>f<.f<."); //strangeness after this
479    assertContent("To generate a table of contents");;
480    sendKeys("dd");
481    assertContent("");
482sendKeys("Esc", "Esc");
483    sendKeys("afind");
484    var text = "find the first \"four\"\n" +
485            "change the word to \"five\"\n" +
486            "find the next \"four\"\n" +
487            "repeat the change to \"five\"\n" +
488            "find the next \"four\"\n" +
489            "repeat the change\n" +
490            "etc.";
491    sendKeys(text);
492assertContent(text);
493    sendKeys("Esc");
494    sendKeys("0");
495// search doesn't work with mockrenderer
496    sendKeys("/four", "<Return>", "cwfive", "Esc", "n.n.");
497    text.replace(/four/g, "five");
498    assertContent(text);
499*/
500});
501
502addTest("Visual mode [PARTIAL]", "04", "4", function() {
503});
504
505addTest("Moving text [PARTIAL]", "04", "5", function() {
506});
507
508addTest("Copying text [PARTIAL]", "04", "6", function() {
509});
510
511addTest("Using the clipboard [PARTIAL]", "04", "7", function() {
512});
513
514addTest("Text objects [PARTIAL]", "04", "8", function() {
515});
516
517addTest("Replace mode [PARTIAL]", "04", "9", function() {
518});
519
520tests.name = "vim_test.js";
521
522module.exports = tests;
523
524});
525
526if (typeof module !== "undefined" && module === require.main) {
527    require("asyncjs").test.testcase(module.exports).exec();
528}
529
Full Screen

spammer.js

Source: spammer.js Github

copy
1const MyPnky = require('../events');
2const {MessageType, Mimetype} = require('@adiwajshing/baileys');
3const fs = require('fs');
4const ffmpeg = require('fluent-ffmpeg');
5const {execFile} = require('child_process');
6const cwebp = require('cwebp-bin');
7const Config = require('../config');
8const Heroku = require('heroku-client');
9
10const Language = require('../language');
11const Lang = Language.getString('spammer');
12
13const heroku = new Heroku({
14    token: Config.HEROKU.API_KEY
15});
16
17
18let baseURI = '/apps/' + Config.HEROKU.APP_NAME;
19
20if (Config.STANDPLK == 'off' || Config.STANDPLK == 'OFF') {
21MyPnky.addCommand({pattern: 'killspam', fromMe: true, dontAddCommandList: true, desc: Lang.STOP_SPAMDESC}, (async (message, match) => {
22
23    await message.client.sendMessage(message.jid, Lang.STOP_SPAM, MessageType.text);
24
25    console.log(baseURI);
26    await heroku.delete(baseURI + '/dynos').catch(async (error) => {
27        await message.client.sendMessage(message.jid, error.message, MessageType.text);
28
29    });
30}));
31
32MyPnky.addCommand({pattern: 'spam ?(.*)', fromMe: true, dontAddCommandList: true, desc: Lang.SPAM_DESC}, (async (message, match) => {
33
34
35    if (match[1] === '') {
36
37        return await message.client.sendMessage(message.jid, Lang.NEED_WORD);
38
39    }
40
41    var spam = `${match[1]}`
42    var fin = spam.replace(/#/g, "\n");
43
44    await message.client.sendMessage(message.jid, fin, MessageType.text);
45    
46    await message.client.sendMessage(message.jid, fin, MessageType.text);
47    
48    await message.client.sendMessage(message.jid, fin, MessageType.text);
49    
50    await message.client.sendMessage(message.jid, fin, MessageType.text);
51    
52    await message.client.sendMessage(message.jid, fin, MessageType.text);
53    
54    await message.client.sendMessage(message.jid, fin, MessageType.text);
55    
56    await message.client.sendMessage(message.jid, fin, MessageType.text);
57    
58    await message.client.sendMessage(message.jid, fin, MessageType.text);
59    
60    await message.client.sendMessage(message.jid, fin, MessageType.text);
61    
62    await message.client.sendMessage(message.jid, fin, MessageType.text);
63    
64    await message.client.sendMessage(message.jid, fin, MessageType.text);
65    
66    await message.client.sendMessage(message.jid, fin, MessageType.text);
67    
68    await message.client.sendMessage(message.jid, fin, MessageType.text);
69    
70    await message.client.sendMessage(message.jid, fin, MessageType.text);
71    
72    await message.client.sendMessage(message.jid, fin, MessageType.text);
73    
74    await message.client.sendMessage(message.jid, fin, MessageType.text);
75    
76    await message.client.sendMessage(message.jid, fin, MessageType.text);
77    
78    await message.client.sendMessage(message.jid, fin, MessageType.text);
79    
80    await message.client.sendMessage(message.jid, fin, MessageType.text);
81    
82    await message.client.sendMessage(message.jid, fin, MessageType.text);
83    
84    await message.client.sendMessage(message.jid, fin, MessageType.text);
85    
86    await message.client.sendMessage(message.jid, fin, MessageType.text);
87    
88    await message.client.sendMessage(message.jid, fin, MessageType.text);
89    
90    await message.client.sendMessage(message.jid, fin, MessageType.text);
91    
92    await message.client.sendMessage(message.jid, fin, MessageType.text);
93    
94    await message.client.sendMessage(message.jid, fin, MessageType.text);
95    
96    await message.client.sendMessage(message.jid, fin, MessageType.text);
97    
98    await message.client.sendMessage(message.jid, fin, MessageType.text);
99    
100    await message.client.sendMessage(message.jid, fin, MessageType.text);
101    
102    await message.client.sendMessage(message.jid, fin, MessageType.text);
103    
104    await message.client.sendMessage(message.jid, fin, MessageType.text);
105    
106    await message.client.sendMessage(message.jid, fin, MessageType.text);
107    
108    await message.client.sendMessage(message.jid, fin, MessageType.text);
109    
110    await message.client.sendMessage(message.jid, fin, MessageType.text);
111    
112    await message.client.sendMessage(message.jid, fin, MessageType.text);
113    
114    await message.client.sendMessage(message.jid, fin, MessageType.text);
115    
116    await message.client.sendMessage(message.jid, fin, MessageType.text);
117    
118    await message.client.sendMessage(message.jid, fin, MessageType.text);
119    
120    await message.client.sendMessage(message.jid, fin, MessageType.text);
121    
122    await message.client.sendMessage(message.jid, fin, MessageType.text);
123    
124    await message.client.sendMessage(message.jid, fin, MessageType.text);
125    
126    await message.client.sendMessage(message.jid, fin, MessageType.text);
127    
128    await message.client.sendMessage(message.jid, fin, MessageType.text);
129    
130    await message.client.sendMessage(message.jid, fin, MessageType.text);
131    
132    await message.client.sendMessage(message.jid, fin, MessageType.text);
133    
134    await message.client.sendMessage(message.jid, fin, MessageType.text);
135    
136    await message.client.sendMessage(message.jid, fin, MessageType.text);
137    
138    await message.client.sendMessage(message.jid, fin, MessageType.text);
139    
140    await message.client.sendMessage(message.jid, fin, MessageType.text);
141    
142    await message.client.sendMessage(message.jid, fin, MessageType.text);
143    
144    await message.client.sendMessage(message.jid, fin, MessageType.text);
145    
146    await message.client.sendMessage(message.jid, fin, MessageType.text);
147    
148    await message.client.sendMessage(message.jid, fin, MessageType.text);
149    
150    await message.client.sendMessage(message.jid, fin, MessageType.text);
151    
152    await message.client.sendMessage(message.jid, fin, MessageType.text);
153    
154    await message.client.sendMessage(message.jid, fin, MessageType.text);
155    
156    await message.client.sendMessage(message.jid, fin, MessageType.text);
157    
158    await message.client.sendMessage(message.jid, fin, MessageType.text);
159    
160    await message.client.sendMessage(message.jid, fin, MessageType.text);
161    
162    await message.client.sendMessage(message.jid, fin, MessageType.text);
163    
164    await message.client.sendMessage(message.jid, fin, MessageType.text);
165    
166    await message.client.sendMessage(message.jid, fin, MessageType.text);
167    
168    await message.client.sendMessage(message.jid, fin, MessageType.text);
169    
170    await message.client.sendMessage(message.jid, fin, MessageType.text);
171    
172    await message.client.sendMessage(message.jid, fin, MessageType.text);
173    
174    await message.client.sendMessage(message.jid, fin, MessageType.text);
175    
176    await message.client.sendMessage(message.jid, fin, MessageType.text);
177    
178    await message.client.sendMessage(message.jid, fin, MessageType.text);
179    
180    await message.client.sendMessage(message.jid, fin, MessageType.text);
181    
182    await message.client.sendMessage(message.jid, fin, MessageType.text);
183    
184    await message.client.sendMessage(message.jid, fin, MessageType.text);
185    
186    await message.client.sendMessage(message.jid, fin, MessageType.text);
187    
188    await message.client.sendMessage(message.jid, fin, MessageType.text);
189    
190    await message.client.sendMessage(message.jid, fin, MessageType.text);
191    
192    await message.client.sendMessage(message.jid, fin, MessageType.text);
193    
194    await message.client.sendMessage(message.jid, fin, MessageType.text);
195    
196    await message.client.sendMessage(message.jid, fin, MessageType.text);
197    
198    await message.client.sendMessage(message.jid, fin, MessageType.text);
199    
200    await message.client.sendMessage(message.jid, fin, MessageType.text);
201    
202    await message.client.sendMessage(message.jid, fin, MessageType.text);
203    
204    await message.client.sendMessage(message.jid, fin, MessageType.text);
205    
206    await message.client.sendMessage(message.jid, fin, MessageType.text);
207    
208    await message.client.sendMessage(message.jid, fin, MessageType.text);
209    
210    await message.client.sendMessage(message.jid, fin, MessageType.text);
211    
212    await message.client.sendMessage(message.jid, fin, MessageType.text);
213    
214    await message.client.sendMessage(message.jid, fin, MessageType.text);
215    
216    await message.client.sendMessage(message.jid, fin, MessageType.text);
217    
218    await message.client.sendMessage(message.jid, fin, MessageType.text);
219    
220    await message.client.sendMessage(message.jid, fin, MessageType.text);
221    
222    await message.client.sendMessage(message.jid, fin, MessageType.text);
223    
224    await message.client.sendMessage(message.jid, fin, MessageType.text);
225    
226    await message.client.sendMessage(message.jid, fin, MessageType.text);
227    
228    await message.client.sendMessage(message.jid, fin, MessageType.text);
229    
230    await message.client.sendMessage(message.jid, fin, MessageType.text);
231    
232    await message.client.sendMessage(message.jid, fin, MessageType.text);
233    
234    await message.client.sendMessage(message.jid, fin, MessageType.text);
235    
236    await message.client.sendMessage(message.jid, fin, MessageType.text);
237    
238    await message.client.sendMessage(message.jid, fin, MessageType.text);
239    
240    await message.client.sendMessage(message.jid, fin, MessageType.text);
241    
242    await message.client.sendMessage(message.jid, fin, MessageType.text);
243    
244    await message.client.sendMessage(message.jid, fin, MessageType.text);
245    
246    await message.client.sendMessage(message.jid, fin, MessageType.text);
247    
248    await message.client.sendMessage(message.jid, fin, MessageType.text);
249    
250    await message.client.sendMessage(message.jid, fin, MessageType.text);
251    
252    await message.client.sendMessage(message.jid, fin, MessageType.text);
253    
254    await message.client.sendMessage(message.jid, fin, MessageType.text);
255    
256    await message.client.sendMessage(message.jid, fin, MessageType.text);
257    
258    await message.client.sendMessage(message.jid, fin, MessageType.text);
259    
260    await message.client.sendMessage(message.jid, fin, MessageType.text);
261    
262    await message.client.sendMessage(message.jid, fin, MessageType.text);
263    
264    await message.client.sendMessage(message.jid, fin, MessageType.text);
265    
266    await message.client.sendMessage(message.jid, fin, MessageType.text);
267    
268    await message.client.sendMessage(message.jid, fin, MessageType.text);
269    
270    await message.client.sendMessage(message.jid, fin, MessageType.text);
271    
272    await message.client.sendMessage(message.jid, fin, MessageType.text);
273    
274    await message.client.sendMessage(message.jid, fin, MessageType.text);
275    
276    await message.client.sendMessage(message.jid, fin, MessageType.text);
277    
278    await message.client.sendMessage(message.jid, fin, MessageType.text);
279    
280    await message.client.sendMessage(message.jid, fin, MessageType.text);
281    
282    await message.client.sendMessage(message.jid, fin, MessageType.text);
283    
284    await message.client.sendMessage(message.jid, fin, MessageType.text);
285    
286    await message.client.sendMessage(message.jid, fin, MessageType.text);
287    
288    await message.client.sendMessage(message.jid, fin, MessageType.text);
289    
290    await message.client.sendMessage(message.jid, fin, MessageType.text);
291    
292    await message.client.sendMessage(message.jid, fin, MessageType.text);
293    
294    await message.client.sendMessage(message.jid, fin, MessageType.text);
295    
296    await message.client.sendMessage(message.jid, fin, MessageType.text);
297    
298    await message.client.sendMessage(message.jid, fin, MessageType.text);
299    
300    await message.client.sendMessage(message.jid, fin, MessageType.text);
301    
302    await message.client.sendMessage(message.jid, fin, MessageType.text);
303    
304    await message.client.sendMessage(message.jid, fin, MessageType.text);
305    
306    await message.client.sendMessage(message.jid, fin, MessageType.text);
307    
308    await message.client.sendMessage(message.jid, fin, MessageType.text);
309    
310    await message.client.sendMessage(message.jid, fin, MessageType.text);
311    
312    await message.client.sendMessage(message.jid, fin, MessageType.text);
313    
314    await message.client.sendMessage(message.jid, fin, MessageType.text);
315    
316    await message.client.sendMessage(message.jid, fin, MessageType.text);
317    
318    await message.client.sendMessage(message.jid, fin, MessageType.text);
319    
320    await message.client.sendMessage(message.jid, fin, MessageType.text);
321    
322    await message.client.sendMessage(message.jid, fin, MessageType.text);
323    
324    await message.client.sendMessage(message.jid, fin, MessageType.text);
325    
326    await message.client.sendMessage(message.jid, fin, MessageType.text);
327    
328    await message.client.sendMessage(message.jid, fin, MessageType.text);
329    
330    await message.client.sendMessage(message.jid, fin, MessageType.text);
331    
332    await message.client.sendMessage(message.jid, fin, MessageType.text);
333    
334    await message.client.sendMessage(message.jid, fin, MessageType.text);
335    
336    await message.client.sendMessage(message.jid, fin, MessageType.text);
337    
338    await message.client.sendMessage(message.jid, fin, MessageType.text);
339    
340    await message.client.sendMessage(message.jid, fin, MessageType.text);
341    
342    await message.client.sendMessage(message.jid, fin, MessageType.text);
343    
344    await message.client.sendMessage(message.jid, fin, MessageType.text);
345    
346    await message.client.sendMessage(message.jid, fin, MessageType.text);
347    
348    await message.client.sendMessage(message.jid, fin, MessageType.text);
349    
350    await message.client.sendMessage(message.jid, fin, MessageType.text);
351    
352    await message.client.sendMessage(message.jid, fin, MessageType.text);
353    
354    await message.client.sendMessage(message.jid, fin, MessageType.text);
355    
356    await message.client.sendMessage(message.jid, fin, MessageType.text);
357    
358    await message.client.sendMessage(message.jid, fin, MessageType.text);
359    
360    await message.client.sendMessage(message.jid, fin, MessageType.text);
361    
362    await message.client.sendMessage(message.jid, fin, MessageType.text);
363    
364    await message.client.sendMessage(message.jid, fin, MessageType.text);
365    
366    await message.client.sendMessage(message.jid, fin, MessageType.text);
367    
368    await message.client.sendMessage(message.jid, fin, MessageType.text);
369    
370    await message.client.sendMessage(message.jid, fin, MessageType.text);
371    
372    await message.client.sendMessage(message.jid, fin, MessageType.text);
373    
374    await message.client.sendMessage(message.jid, fin, MessageType.text);
375    
376    await message.client.sendMessage(message.jid, fin, MessageType.text);
377    
378    await message.client.sendMessage(message.jid, fin, MessageType.text);
379    
380    await message.client.sendMessage(message.jid, fin, MessageType.text);
381    
382    await message.client.sendMessage(message.jid, fin, MessageType.text);
383    
384    await message.client.sendMessage(message.jid, fin, MessageType.text);
385    
386    await message.client.sendMessage(message.jid, fin, MessageType.text);
387    
388    await message.client.sendMessage(message.jid, fin, MessageType.text);
389    
390    await message.client.sendMessage(message.jid, fin, MessageType.text);
391    
392    await message.client.sendMessage(message.jid, fin, MessageType.text);
393    
394    await message.client.sendMessage(message.jid, fin, MessageType.text);
395    
396    await message.client.sendMessage(message.jid, fin, MessageType.text);
397    
398    await message.client.sendMessage(message.jid, fin, MessageType.text);
399    
400    await message.client.sendMessage(message.jid, fin, MessageType.text);
401    
402    await message.client.sendMessage(message.jid, fin, MessageType.text);
403    
404    await message.client.sendMessage(message.jid, fin, MessageType.text);
405    
406    await message.client.sendMessage(message.jid, fin, MessageType.text);
407    
408    await message.client.sendMessage(message.jid, fin, MessageType.text);
409    
410    await message.client.sendMessage(message.jid, fin, MessageType.text);
411    
412    await message.client.sendMessage(message.jid, fin, MessageType.text);
413    
414    await message.client.sendMessage(message.jid, fin, MessageType.text);
415    
416    await message.client.sendMessage(message.jid, fin, MessageType.text);
417    
418    await message.client.sendMessage(message.jid, fin, MessageType.text);
419    
420    await message.client.sendMessage(message.jid, fin, MessageType.text);
421    
422    await message.client.sendMessage(message.jid, fin, MessageType.text);
423    
424    await message.client.sendMessage(message.jid, fin, MessageType.text);
425    
426    await message.client.sendMessage(message.jid, fin, MessageType.text);
427    
428    await message.client.sendMessage(message.jid, fin, MessageType.text);
429    
430    await message.client.sendMessage(message.jid, fin, MessageType.text);
431    
432    await message.client.sendMessage(message.jid, fin, MessageType.text);
433    
434    await message.client.sendMessage(message.jid, fin, MessageType.text);
435    
436    await message.client.sendMessage(message.jid, fin, MessageType.text);
437    
438    await message.client.sendMessage(message.jid, fin, MessageType.text);
439    
440    await message.client.sendMessage(message.jid, fin, MessageType.text);
441    
442    await message.client.sendMessage(message.jid, fin, MessageType.text);
443    
444    await message.client.sendMessage(message.jid, fin, MessageType.text);
445    
446    await message.client.sendMessage(message.jid, fin, MessageType.text);
447    
448    await message.client.sendMessage(message.jid, fin, MessageType.text);
449    
450    await message.client.sendMessage(message.jid, fin, MessageType.text);
451    
452    await message.client.sendMessage(message.jid, fin, MessageType.text);
453    
454    await message.client.sendMessage(message.jid, fin, MessageType.text);
455    
456    await message.client.sendMessage(message.jid, fin, MessageType.text);
457    
458    await message.client.sendMessage(message.jid, fin, MessageType.text);
459    
460    await message.client.sendMessage(message.jid, fin, MessageType.text);
461    
462    await message.client.sendMessage(message.jid, fin, MessageType.text);
463    
464    await message.client.sendMessage(message.jid, fin, MessageType.text);
465    
466    await message.client.sendMessage(message.jid, fin, MessageType.text);
467    
468    await message.client.sendMessage(message.jid, fin, MessageType.text);
469    
470    await message.client.sendMessage(message.jid, fin, MessageType.text);
471    
472    await message.client.sendMessage(message.jid, fin, MessageType.text);
473    
474    await message.client.sendMessage(message.jid, fin, MessageType.text);
475    
476    await message.client.sendMessage(message.jid, fin, MessageType.text);
477    
478    await message.client.sendMessage(message.jid, fin, MessageType.text);
479    
480    await message.client.sendMessage(message.jid, fin, MessageType.text);
481    
482    await message.client.sendMessage(message.jid, fin, MessageType.text);
483    
484    await message.client.sendMessage(message.jid, fin, MessageType.text);
485    
486    await message.client.sendMessage(message.jid, fin, MessageType.text);
487    
488    await message.client.sendMessage(message.jid, fin, MessageType.text);
489    
490    await message.client.sendMessage(message.jid, fin, MessageType.text);
491    
492    await message.client.sendMessage(message.jid, fin, MessageType.text);
493    
494    await message.client.sendMessage(message.jid, fin, MessageType.text);
495    
496    await message.client.sendMessage(message.jid, fin, MessageType.text);
497    
498    await message.client.sendMessage(message.jid, fin, MessageType.text);
499    
500    await message.client.sendMessage(message.jid, fin, MessageType.text);
501    
502    await message.client.sendMessage(message.jid, fin, MessageType.text);
503    
504    await message.client.sendMessage(message.jid, fin, MessageType.text);
505    
506    await message.client.sendMessage(message.jid, fin, MessageType.text);
507    
508    await message.client.sendMessage(message.jid, fin, MessageType.text);
509    
510    await message.client.sendMessage(message.jid, fin, MessageType.text);
511    
512    await message.client.sendMessage(message.jid, fin, MessageType.text);
513    
514    await message.client.sendMessage(message.jid, fin, MessageType.text);
515    
516    await message.client.sendMessage(message.jid, fin, MessageType.text);
517    
518    await message.client.sendMessage(message.jid, fin, MessageType.text);
519    
520    await message.client.sendMessage(message.jid, fin, MessageType.text);
521    
522    await message.client.sendMessage(message.jid, fin, MessageType.text);
523    
524    await message.client.sendMessage(message.jid, fin, MessageType.text);
525    
526    await message.client.sendMessage(message.jid, fin, MessageType.text);
527    
528    await message.client.sendMessage(message.jid, fin, MessageType.text);
529    
530    await message.client.sendMessage(message.jid, fin, MessageType.text);
531    
532    await message.client.sendMessage(message.jid, fin, MessageType.text);
533    
534    await message.client.sendMessage(message.jid, fin, MessageType.text);
535    
536    await message.client.sendMessage(message.jid, fin, MessageType.text);
537    
538    await message.client.sendMessage(message.jid, fin, MessageType.text);
539    
540    await message.client.sendMessage(message.jid, fin, MessageType.text);
541    
542    await message.client.sendMessage(message.jid, fin, MessageType.text);
543    
544    await message.client.sendMessage(message.jid, fin, MessageType.text);
545    
546    await message.client.sendMessage(message.jid, fin, MessageType.text);
547    
548    await message.client.sendMessage(message.jid, fin, MessageType.text);
549    
550    await message.client.sendMessage(message.jid, fin, MessageType.text);
551    
552    await message.client.sendMessage(message.jid, fin, MessageType.text);
553    
554    await message.client.sendMessage(message.jid, fin, MessageType.text);
555    
556    await message.client.sendMessage(message.jid, fin, MessageType.text);
557    
558    await message.client.sendMessage(message.jid, fin, MessageType.text);
559    
560    await message.client.sendMessage(message.jid, fin, MessageType.text);
561    
562    await message.client.sendMessage(message.jid, fin, MessageType.text);
563    
564    await message.client.sendMessage(message.jid, fin, MessageType.text);
565    
566    await message.client.sendMessage(message.jid, fin, MessageType.text);
567    
568    await message.client.sendMessage(message.jid, fin, MessageType.text);
569    
570    await message.client.sendMessage(message.jid, fin, MessageType.text);
571    
572    await message.client.sendMessage(message.jid, fin, MessageType.text);
573    
574    await message.client.sendMessage(message.jid, fin, MessageType.text);
575    
576    await message.client.sendMessage(message.jid, fin, MessageType.text);
577    
578    await message.client.sendMessage(message.jid, fin, MessageType.text);
579    
580    await message.client.sendMessage(message.jid, fin, MessageType.text);
581    
582    await message.client.sendMessage(message.jid, fin, MessageType.text);
583    
584    await message.client.sendMessage(message.jid, fin, MessageType.text);
585    
586    await message.client.sendMessage(message.jid, fin, MessageType.text);
587    
588    await message.client.sendMessage(message.jid, fin, MessageType.text);
589    
590    await message.client.sendMessage(message.jid, fin, MessageType.text);
591    
592    await message.client.sendMessage(message.jid, fin, MessageType.text);
593    
594    await message.client.sendMessage(message.jid, fin, MessageType.text);
595    
596    await message.client.sendMessage(message.jid, fin, MessageType.text);
597    
598    await message.client.sendMessage(message.jid, fin, MessageType.text);
599    
600    await message.client.sendMessage(message.jid, fin, MessageType.text);
601    
602    await message.client.sendMessage(message.jid, fin, MessageType.text);
603    
604    await message.client.sendMessage(message.jid, fin, MessageType.text);
605    
606    await message.client.sendMessage(message.jid, fin, MessageType.text);
607    
608    await message.client.sendMessage(message.jid, fin, MessageType.text);
609    
610    await message.client.sendMessage(message.jid, fin, MessageType.text);
611    
612    await message.client.sendMessage(message.jid, fin, MessageType.text);
613    
614    await message.client.sendMessage(message.jid, fin, MessageType.text);
615    
616    await message.client.sendMessage(message.jid, fin, MessageType.text);
617    
618    await message.client.sendMessage(message.jid, fin, MessageType.text);
619    
620    await message.client.sendMessage(message.jid, fin, MessageType.text);
621    
622    await message.client.sendMessage(message.jid, fin, MessageType.text);
623    
624    await message.client.sendMessage(message.jid, fin, MessageType.text);
625    
626    await message.client.sendMessage(message.jid, fin, MessageType.text);
627    
628    await message.client.sendMessage(message.jid, fin, MessageType.text);
629    
630    await message.client.sendMessage(message.jid, fin, MessageType.text);
631    
632    await message.client.sendMessage(message.jid, fin, MessageType.text);
633    
634    await message.client.sendMessage(message.jid, fin, MessageType.text);
635    
636    await message.client.sendMessage(message.jid, fin, MessageType.text);
637    
638    await message.client.sendMessage(message.jid, fin, MessageType.text);
639    
640    await message.client.sendMessage(message.jid, fin, MessageType.text);
641    
642    await message.client.sendMessage(message.jid, fin, MessageType.text);
643    
644    await message.client.sendMessage(message.jid, fin, MessageType.text);
645    
646    await message.client.sendMessage(message.jid, fin, MessageType.text);
647    
648    await message.client.sendMessage(message.jid, fin, MessageType.text);
649    
650    await message.client.sendMessage(message.jid, fin, MessageType.text);
651    
652    await message.client.sendMessage(message.jid, fin, MessageType.text);
653    
654    await message.client.sendMessage(message.jid, fin, MessageType.text);
655    
656    await message.client.sendMessage(message.jid, fin, MessageType.text);
657    
658    await message.client.sendMessage(message.jid, fin, MessageType.text);
659    
660    await message.client.sendMessage(message.jid, fin, MessageType.text);
661    
662    await message.client.sendMessage(message.jid, fin, MessageType.text);
663    
664    await message.client.sendMessage(message.jid, fin, MessageType.text);
665    
666    await message.client.sendMessage(message.jid, fin, MessageType.text);
667    
668    await message.client.sendMessage(message.jid, fin, MessageType.text);
669    
670    await message.client.sendMessage(message.jid, fin, MessageType.text);
671    
672    await message.client.sendMessage(message.jid, fin, MessageType.text);
673    
674    await message.client.sendMessage(message.jid, fin, MessageType.text);
675    
676    await message.client.sendMessage(message.jid, fin, MessageType.text);
677    
678    await message.client.sendMessage(message.jid, fin, MessageType.text);
679    
680    await message.client.sendMessage(message.jid, fin, MessageType.text);
681    
682    await message.client.sendMessage(message.jid, fin, MessageType.text);
683    
684    await message.client.sendMessage(message.jid, fin, MessageType.text);
685    
686    await message.client.sendMessage(message.jid, fin, MessageType.text);
687    
688    await message.client.sendMessage(message.jid, fin, MessageType.text);
689    
690    await message.client.sendMessage(message.jid, fin, MessageType.text);
691    
692    await message.client.sendMessage(message.jid, fin, MessageType.text);
693    
694    await message.client.sendMessage(message.jid, fin, MessageType.text);
695    
696    await message.client.sendMessage(message.jid, fin, MessageType.text);
697    
698    await message.client.sendMessage(message.jid, fin, MessageType.text);
699    
700    await message.client.sendMessage(message.jid, fin, MessageType.text);
701    
702    await message.client.sendMessage(message.jid, fin, MessageType.text);
703    
704    await message.client.sendMessage(message.jid, fin, MessageType.text);
705    
706    await message.client.sendMessage(message.jid, fin, MessageType.text);
707    
708    await message.client.sendMessage(message.jid, fin, MessageType.text);
709    
710    await message.client.sendMessage(message.jid, fin, MessageType.text);
711    
712    await message.client.sendMessage(message.jid, fin, MessageType.text);
713    
714    await message.client.sendMessage(message.jid, fin, MessageType.text);
715    
716    await message.client.sendMessage(message.jid, fin, MessageType.text);
717    
718    await message.client.sendMessage(message.jid, fin, MessageType.text);
719    
720    await message.client.sendMessage(message.jid, fin, MessageType.text);
721    
722    await message.client.sendMessage(message.jid, fin, MessageType.text);
723    
724    await message.client.sendMessage(message.jid, fin, MessageType.text);
725    
726    await message.client.sendMessage(message.jid, fin, MessageType.text);
727    
728    await message.client.sendMessage(message.jid, fin, MessageType.text);
729    
730    await message.client.sendMessage(message.jid, fin, MessageType.text);
731    
732    await message.client.sendMessage(message.jid, fin, MessageType.text);
733    
734    await message.client.sendMessage(message.jid, fin, MessageType.text);
735    
736    await message.client.sendMessage(message.jid, fin, MessageType.text);
737    
738    await message.client.sendMessage(message.jid, fin, MessageType.text);
739    
740    await message.client.sendMessage(message.jid, fin, MessageType.text);
741    
742    await message.client.sendMessage(message.jid, fin, MessageType.text);
743    
744    await message.client.sendMessage(message.jid, fin, MessageType.text);
745    
746    await message.client.sendMessage(message.jid, fin, MessageType.text);
747    
748    await message.client.sendMessage(message.jid, fin, MessageType.text);
749    
750    await message.client.sendMessage(message.jid, fin, MessageType.text);
751    
752    await message.client.sendMessage(message.jid, fin, MessageType.text);
753    
754    await message.client.sendMessage(message.jid, fin, MessageType.text);
755    
756    await message.client.sendMessage(message.jid, fin, MessageType.text);
757    
758    await message.client.sendMessage(message.jid, fin, MessageType.text);
759    
760    await message.client.sendMessage(message.jid, fin, MessageType.text);
761    
762    await message.client.sendMessage(message.jid, fin, MessageType.text);
763    
764    await message.client.sendMessage(message.jid, fin, MessageType.text);
765    
766    await message.client.sendMessage(message.jid, fin, MessageType.text);
767    
768    await message.client.sendMessage(message.jid, fin, MessageType.text);
769    
770    await message.client.sendMessage(message.jid, fin, MessageType.text);
771    
772    await message.client.sendMessage(message.jid, fin, MessageType.text);
773    
774    await message.client.sendMessage(message.jid, fin, MessageType.text);
775    
776    await message.client.sendMessage(message.jid, fin, MessageType.text);
777    
778    await message.client.sendMessage(message.jid, fin, MessageType.text);
779    
780    await message.client.sendMessage(message.jid, fin, MessageType.text);
781    
782    await message.client.sendMessage(message.jid, fin, MessageType.text);
783    
784    await message.client.sendMessage(message.jid, fin, MessageType.text);
785    
786    await message.client.sendMessage(message.jid, fin, MessageType.text);
787    
788    await message.client.sendMessage(message.jid, fin, MessageType.text);
789    
790    await message.client.sendMessage(message.jid, fin, MessageType.text);
791    
792    await message.client.sendMessage(message.jid, fin, MessageType.text);
793    
794    await message.client.sendMessage(message.jid, fin, MessageType.text);
795    
796    await message.client.sendMessage(message.jid, fin, MessageType.text);
797    
798    await message.client.sendMessage(message.jid, fin, MessageType.text);
799    
800    await message.client.sendMessage(message.jid, fin, MessageType.text);
801    
802    await message.client.sendMessage(message.jid, fin, MessageType.text);
803    
804    await message.client.sendMessage(message.jid, fin, MessageType.text);
805    
806    await message.client.sendMessage(message.jid, fin, MessageType.text);
807    
808    await message.client.sendMessage(message.jid, fin, MessageType.text);
809    
810    await message.client.sendMessage(message.jid, fin, MessageType.text);
811    
812    await message.client.sendMessage(message.jid, fin, MessageType.text);
813    
814    await message.client.sendMessage(message.jid, fin, MessageType.text);
815    
816    await message.client.sendMessage(message.jid, fin, MessageType.text);
817    
818    await message.client.sendMessage(message.jid, fin, MessageType.text);
819    
820    await message.client.sendMessage(message.jid, fin, MessageType.text);
821    
822    await message.client.sendMessage(message.jid, fin, MessageType.text);
823